/**
 * Gift Card upsell — popup + product-page message field.
 */

/* ---------------------------------------------------------------------------
   Product page: personalised message field
   --------------------------------------------------------------------------- */
.slsd-gc-message-field {
    margin: 0 0 1.5rem;
    /* The theme renders the add-to-cart form as a flex row; force this field
       onto its own full-width line so quantity + Add to Basket wrap below it. */
    flex: 0 0 100%;
    width: 100%;
    order: -1;
}

.slsd-gc-message-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.slsd-gc-message-field .required {
    color: #dc2626;
}

.slsd-gc-message-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
}

.slsd-gc-message-field textarea:focus {
    outline: none;
    border-color: #2c5f7c;
}

.slsd-gc-counter {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #777;
    text-align: right;
}

.slsd-gc-counter__count {
    font-weight: 600;
}

.slsd-gc-counter--limit {
    color: #dc2626;
}

.slsd-gc-counter--limit .slsd-gc-counter__count {
    font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Upsell popup
   --------------------------------------------------------------------------- */
body.slsd-gc-popup-open {
    overflow: hidden;
}

.slsd-gc-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slsd-gc-popup[hidden] {
    display: none;
}

.slsd-gc-popup__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
}

.slsd-gc-popup__dialog {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 10px;
    max-width: 460px;
    width: calc(100% - 2.5rem);
    padding: 2.25rem 2rem 1.75rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: slsd-gc-pop 0.2s ease-out;
}

@keyframes slsd-gc-pop {
    from { transform: translateY(12px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.slsd-gc-popup__close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0.25rem;
}

.slsd-gc-popup__close:hover {
    color: #222;
}

.slsd-gc-popup__heading {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    color: #2c5f7c;
}

.slsd-gc-popup__body {
    margin: 0 0 1.5rem;
    color: #444;
    line-height: 1.55;
}

.slsd-gc-popup__actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
}

.slsd-gc-popup__yes {
    display: inline-block;
    background: #2c5f7c;
    color: #fff;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.slsd-gc-popup__yes:hover {
    background: #234a5f;
    color: #fff;
}

.slsd-gc-popup__no {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.95rem;
    text-decoration: underline;
}

.slsd-gc-popup__no:hover {
    color: #222;
}

@media (max-width: 480px) {
    .slsd-gc-popup__dialog {
        padding: 2rem 1.25rem 1.5rem;
    }
}
