/* ============================================
    Plunksna Woo Greeting Option - v1.11.6
   ============================================ */

.plunksna-woo-greeting {
    color: #455f73;
}

.plunksna-woo-greeting--disabled {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.plunksna-woo-greeting__toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.plunksna-woo-greeting__checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plunksna-woo-greeting__checkbox-ui {
    width: 18px;
    height: 18px;
    border: 2px solid #556f82;
    border-radius: 50%;
    flex: 0 0 18px;
    margin-top: 4px;
    position: relative;
}

.plunksna-woo-greeting__checkbox:checked + .plunksna-woo-greeting__checkbox-ui::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #2f7bc0;
}

.plunksna-woo-greeting__label-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.4;
}

.plunksna-woo-greeting__label {
    font-size: 22px;
    color: #486276;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.plunksna-woo-greeting__price {
    font-size: 22px;
    color: #486276;
}

.plunksna-woo-greeting__description {
    margin-top: 14px;
    max-width: 860px;
    font-size: 15px;
    line-height: 1.65;
    color: #5a6d7d;
}

.plunksna-woo-greeting__actions {
    margin-top: 18px;
}

.plunksna-woo-greeting__open-popup,
.plunksna-woo-greeting__button {
    border: 1px solid #8db4d7;
    background: #fff;
    color: #2f7bc0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.plunksna-woo-greeting__open-popup {
    min-width: 320px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
}

.plunksna-woo-greeting__open-popup:hover,
.plunksna-woo-greeting__button:hover {
    background: #2f7bc0;
    color: #fff;
}

.plunksna-woo-greeting__summary {
    margin-top: 10px;
    font-size: 14px;
    color: #486276;
}

.plunksna-woo-greeting__modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 8px;
}

.plunksna-woo-greeting__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(67, 84, 99, 0.28);
}

.plunksna-woo-greeting__dialog {
    position: relative;
    width: min(940px, calc(100vw - 24px));
    max-height: calc(100vh - 16px);
    overflow: auto;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    background: #fdfdfd;
    border: 1px solid #9fb4c5;
    border-radius: 16px;
    box-shadow: 0 16px 45px rgba(59, 79, 98, 0.16);
    padding: 34px 38px 26px;
    box-sizing: border-box;
}

.plunksna-woo-greeting__close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0 !important;
    background: transparent !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
    color: #557186;
    cursor: pointer;
    padding: 0 !important;
    transition: color 0.2s ease;
}

.plunksna-woo-greeting__close::before {
    content: '\00D7';
    font-size: 26px;
    line-height: 32px;
}

.plunksna-woo-greeting__close:hover {
    color: #297BBE;
}

.plunksna-woo-greeting__dialog-header {
    text-align: center;
    margin-bottom: 30px;
}

.plunksna-woo-greeting__dialog-title {
    margin: 0;
    color: #2f7bc0;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 300;
}

.plunksna-woo-greeting__dialog-subtitle {
    margin-top: 10px;
    color: #5d6e7d;
    font-size: 14px;
}

.plunksna-woo-greeting__dialog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.plunksna-woo-greeting__dialog-grid--content {
    margin-top: 24px;
    align-items: stretch;
}

.plunksna-woo-greeting__field {
    display: flex;
    flex-direction: column;
}

.plunksna-woo-greeting__field label {
    display: block;
    margin-bottom: 8px;
    color: #4f6678;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
}

.plunksna-woo-greeting__field-help {
    margin-top: 8px;
    color: #6d7f8e;
    font-size: 12px;
    line-height: 1.5;
}

.plunksna-woo-greeting__input,
.plunksna-woo-greeting__textarea {
    width: 100%;
    border: 1px solid #9ec0df;
    color: #456074;
    background: #fff;
    font-size: 14px;
    padding: 11px 14px;
    box-sizing: border-box;
    outline: none;
}

.plunksna-woo-greeting__input {
    min-height: 44px;
}

.plunksna-woo-greeting__input::placeholder,
.plunksna-woo-greeting__textarea::placeholder {
    color: #9aa9b5;
}

.plunksna-woo-greeting__input:focus,
.plunksna-woo-greeting__textarea:focus {
    border-color: #2f7bc0;
    box-shadow: 0 0 0 1px rgba(47, 123, 192, 0.08);
}

.plunksna-woo-greeting__textarea {
    min-height: 200px;
    resize: vertical;
    flex: 1;
}

.plunksna-woo-greeting__samples {
    border: 1px solid #9ec0df;
    background: #fff;
    padding: 0;
    min-height: 246px;
    max-height: 246px;
    overflow: auto;
    flex: 1;
}

@media (min-width: 768px) {
    .plunksna-woo-greeting__dialog-grid--content {
        height: clamp(300px, calc(100vh - 470px), 420px);
    }

    .plunksna-woo-greeting__dialog-grid--content > .plunksna-woo-greeting__field {
        min-height: 0;
    }

    .plunksna-woo-greeting__dialog-grid--content > .plunksna-woo-greeting__field:first-child .plunksna-woo-greeting__samples,
    .plunksna-woo-greeting__dialog-grid--content > .plunksna-woo-greeting__field:last-child .plunksna-woo-greeting__textarea {
        min-height: 0;
        height: 100%;
        max-height: none;
    }
}

.plunksna-woo-greeting__samples::-webkit-scrollbar {
    width: 8px;
}

.plunksna-woo-greeting__samples::-webkit-scrollbar-track {
    background: #edf3f8;
}

.plunksna-woo-greeting__samples::-webkit-scrollbar-thumb {
    background: #7ea8cf;
    border-radius: 10px;
}

.plunksna-woo-greeting__sample-category {
    padding: 14px 18px 10px;
    background: #fff;
    color: #2f7bc0;
    font-size: 16px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.4;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #edf3f8;
}

.plunksna-woo-greeting__sample {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px 18px;
}

.plunksna-woo-greeting__sample + .plunksna-woo-greeting__sample {
    margin-top: 0;
    border-top: 1px solid #edf3f8;
}

.plunksna-woo-greeting__sample-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #a0b4c5;
    border-radius: 50%;
    margin: 2px 0 0;
    cursor: pointer;
    position: relative;
    background: #fff;
}

.plunksna-woo-greeting__sample-radio:checked {
    border-color: #2f7bc0;
}

.plunksna-woo-greeting__sample-radio:checked::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #2f7bc0;
}

.plunksna-woo-greeting__sample-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #3d5468;
    font-size: 14px;
    line-height: 1.7;
}

.plunksna-woo-greeting__sample-content span {
    white-space: pre-line;
}

.plunksna-woo-greeting__sample-content strong {
    color: #2f7bc0;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
}

.plunksna-woo-greeting__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #5d6e7d;
    font-size: 13px;
}

.plunksna-woo-greeting__error {
    margin-top: 16px;
    padding: 12px 14px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
    border-radius: 8px;
}

/* Per-field validation */
.plunksna-woo-greeting--field-invalid {
    border-color: #b91c1c !important;
    box-shadow: 0 0 0 1px #b91c1c !important;
}

.plunksna-woo-greeting__field-error {
    display: block;
    margin-top: 4px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.plunksna-woo-greeting__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
}

.plunksna-woo-greeting__button {
    min-width: 192px;
    padding: 13px 22px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.plunksna-woo-greeting__button--primary {
    background: #2f7bc0;
    color: #fff;
}

.plunksna-woo-greeting__button--ghost {
    background: #fff;
    color: #2f7bc0;
}

.plunksna-woo-greeting__button--primary:hover {
    background: #1f5e95;
}

.plunksna-woo-greeting__notice {
    padding: 14px 16px;
    border: 1px dashed #cbd5e1;
    color: #5d6e7d;
    background: #f8fafc;
}

body.plunksna-woo-greeting-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .plunksna-woo-greeting__label,
    .plunksna-woo-greeting__price {
        font-size: 17px;
    }

    .plunksna-woo-greeting__open-popup,
    .plunksna-woo-greeting__button {
        min-width: 0;
        width: 100%;
    }

    .plunksna-woo-greeting__dialog {
        width: calc(100vw - 16px);
        top: auto;
        transform: none;
        margin: 8px auto;
        padding: 24px 16px 20px;
        border-radius: 12px;
    }

    .plunksna-woo-greeting__dialog-grid,
    .plunksna-woo-greeting__dialog-grid--content {
        grid-template-columns: 1fr;
    }

    .plunksna-woo-greeting__footer {
        flex-direction: column;
    }
}
