.gwfw-container {
    margin: 12px 0;
}

.gwfw-container.gwfw-empty {
    display: none;
}

.gwfw-offer {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.gwfw-offer.gwfw-loading {
    opacity: 0.5;
    pointer-events: none;
}

.gwfw-control {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    max-width: 100%;
}

.gwfw-control-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gwfw-gift-icon {
    display: inline-block;
    vertical-align: middle;
    color: var(--gwfw-accent);
}

.gwfw-icon {
    display: inline-flex;
    align-items: center;
}

.gwfw-price {
    font-weight: 600;
    color: var(--gwfw-accent);
}

.gwfw-switch {
    display: none;
}

.gwfw-style-checkbox .gwfw-toggle-input {
    margin: 0;
}

.gwfw-style-button .gwfw-toggle-input,
.gwfw-style-toggle .gwfw-toggle-input,
.gwfw-style-card .gwfw-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gwfw-style-button .gwfw-control-box {
    background: var(--gwfw-btn);
    color: var(--gwfw-btn-text);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    padding: 8px 16px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.gwfw-style-button .gwfw-toggle-input:checked ~ .gwfw-control-box {
    border-color: var(--gwfw-accent);
    box-shadow: 0 0 0 2px var(--gwfw-accent) inset;
}

.gwfw-style-toggle .gwfw-switch {
    display: inline-block;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: #ccc;
    position: relative;
    flex: 0 0 auto;
    transition: background 0.15s ease;
}

.gwfw-style-toggle .gwfw-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.15s ease;
}

.gwfw-style-toggle .gwfw-toggle-input:checked ~ .gwfw-control-box .gwfw-switch {
    background: var(--gwfw-accent);
}

.gwfw-style-toggle .gwfw-toggle-input:checked ~ .gwfw-control-box .gwfw-switch::after {
    left: 20px;
}

.gwfw-style-card .gwfw-control {
    display: flex;
}

.gwfw-style-card .gwfw-control-box {
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 14px 16px;
    width: 100%;
    background: var(--gwfw-btn);
    color: var(--gwfw-btn-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gwfw-style-card .gwfw-toggle-input:checked ~ .gwfw-control-box {
    border-color: var(--gwfw-accent);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.gwfw-panel {
    margin: 10px 0 0;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    max-width: 480px;
}

.gwfw-designs-label,
.gwfw-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.gwfw-required {
    color: #b32d2e;
}

.gwfw-dropdown {
    position: relative;
    margin-bottom: 10px;
}

.gwfw-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    text-align: left;
}

.gwfw-caret {
    margin-left: auto;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(45deg);
    flex: 0 0 auto;
}

.gwfw-dropdown-panel {
    position: absolute;
    z-index: 100;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.gwfw-dropdown-panel li {
    margin: 0;
    list-style: none;
}

.gwfw-dropdown-panel .gwfw-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: 0;
    padding: 6px 8px;
    cursor: pointer;
    text-align: left;
    border-radius: 4px;
}

.gwfw-dropdown-panel .gwfw-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.gwfw-dropdown-panel .gwfw-option.gwfw-option-selected {
    background: rgba(0, 0, 0, 0.04);
    outline: 2px solid var(--gwfw-accent);
    outline-offset: -2px;
}

.gwfw-option-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
}

.gwfw-option-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gwfw-option-price {
    font-weight: 600;
    color: var(--gwfw-accent);
    flex: 0 0 auto;
}

.gwfw-popup-current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

.gwfw-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.gwfw-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.gwfw-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.gwfw-modal-small {
    max-width: 420px;
}

.gwfw-modal-medium {
    max-width: 620px;
}

.gwfw-modal-large {
    max-width: 860px;
}

.gwfw-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

.gwfw-modal-title {
    margin: 0 0 16px;
}

.gwfw-confirm-text {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
}

.gwfw-confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gwfw-confirm-yes,
.gwfw-confirm-no {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.gwfw-confirm-yes {
    background: var(--gwfw-accent);
    color: #fff;
    border: 1px solid var(--gwfw-accent);
}

.gwfw-confirm-yes:hover {
    filter: brightness(0.94);
}

.gwfw-confirm-no {
    background: #fff;
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.gwfw-confirm-no:hover {
    background: #f6f7f8;
    border-color: rgba(0, 0, 0, 0.32);
}

.gwfw-confirm-yes:focus-visible,
.gwfw-confirm-no:focus-visible {
    outline: 2px solid var(--gwfw-accent);
    outline-offset: 2px;
}

.gwfw-modal-grid {
    display: grid;
    gap: 14px;
}

.gwfw-cols-1 {
    grid-template-columns: 1fr;
}

.gwfw-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 520px) {
    .gwfw-cols-2 {
        grid-template-columns: 1fr;
    }
}

.gwfw-design-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    align-items: center;
}

.gwfw-design-card.gwfw-option-selected {
    border-color: var(--gwfw-accent);
}

.gwfw-design-image {
    width: 100%;
    max-width: 160px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
}

.gwfw-design-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.gwfw-design-title {
    font-weight: 600;
}

.gwfw-design-desc {
    font-size: 12px;
    color: #666;
}

.gwfw-design-price {
    font-weight: 600;
    color: var(--gwfw-accent);
}

.gwfw-field {
    margin: 0 0 10px;
}

.gwfw-field .gwfw-input {
    width: 100%;
    box-sizing: border-box;
}

.gwfw-input-error {
    border-color: #b32d2e !important;
    box-shadow: 0 0 0 1px #b32d2e;
}

.gwfw-counter {
    display: block;
    font-size: 12px;
    color: #777;
    text-align: right;
    margin-top: 2px;
}

.gwfw-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.gwfw-remove {
    background: none;
    border: 0;
    color: #b32d2e;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.gwfw-feedback {
    font-size: 12px;
    color: var(--gwfw-accent);
}

.gwfw-offer > .gwfw-feedback {
    display: inline-block;
    margin: 2px 0 0 8px;
    vertical-align: middle;
}

.gwfw-feedback-error {
    color: #b32d2e;
}

.gwfw-threshold-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px dashed var(--gwfw-accent);
    margin: 10px 0;
}

.gwfw-threshold-reached {
    border-style: solid;
}

.gwfw-included-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--gwfw-accent);
    font-weight: 600;
    margin: 8px 0;
}

.gwfw-included-badge-small {
    font-size: 12px;
    padding: 3px 8px;
    margin: 4px 0;
}

.gwfw-items-manager {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.gwfw-items-manager .gwfw-heading {
    margin: 0 0 8px;
}

.gwfw-item-row {
    padding: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.gwfw-item-row:first-of-type {
    border-top: 0;
}

.gwfw-item-name {
    display: block;
    font-weight: 600;
}

.gwfw-product-offer {
    margin: 12px 0;
    width: 100%;
    flex-basis: 100%;
}
