/* Modal Backdrop */
#giftly-auto-add-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#giftly-auto-add-modal.giftly-auto-add-hidden {
    display: none !important;
}

.giftly-auto-add-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

/* Modal Content */
.giftly-auto-add-content {
    position: relative;
    background: var(--bg-color, #ffffff);
    border-radius: var(--border-radius, 12px);
    width: 90%;
    max-width: 400px;
    padding: 32px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: giftlyFadeInUp 0.3s ease-out forwards;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Close icon */
.giftly-auto-add-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    border-radius: 4px;
}

.giftly-auto-add-close:hover {
    background: #f1f1f1;
}

/* Typography */
.giftly-auto-add-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-color, #111111);
}

.giftly-auto-add-header p {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.4;
}

/* Image */
.giftly-auto-add-product-image-wrapper {
    margin-bottom: 16px;
}

.giftly-auto-add-product-image-wrapper img {
    width: 100%;
    max-width: 160px;
    border-radius: 8px;
    object-fit: contain;
}

/* Product title */
#giftly-auto-add-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-color, #333333);
}

/* Variants Dropdown */
#giftly-auto-add-variants-wrapper {
    margin-bottom: 24px;
}

#giftly-auto-add-variants {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    font-size: 14px;
    cursor: pointer;
}

/* Buttons */
.giftly-auto-add-btn-primary {
    display: block;
    width: 100%;
    background-color: var(--btn-bg, #333333);
    color: var(--btn-text, #ffffff);
    border: none;
    padding: 12px;
    border-radius: var(--border-radius, 6px);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

.giftly-auto-add-btn-primary:active {
    opacity: 0.8;
}

.giftly-auto-add-btn-primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.giftly-auto-add-btn-secondary {
    display: block;
    width: 100%;
    background: transparent;
    color: #555;
    border: none;
    padding: 8px;
    font-size: 14px;
    cursor: pointer;
}

.giftly-auto-add-btn-secondary:hover {
    text-decoration: underline;
}

@keyframes giftlyFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}