/**
 * Back-In-Stock Notification Styles
 * Modern, clean design that matches WooCommerce aesthetics
 */

/* Wrapper */
.ps-back-in-stock-wrapper {
    margin: 20px 0;
    padding: 0;
}

/* Main Button */
.ps-back-in-stock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: var(--ps-bis-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    border: none;
    border-radius: var(--ps-button-radius, 8px);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
    font-family: inherit;
}

.ps-back-in-stock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.35);
}

.ps-back-in-stock-btn:active {
    transform: translateY(0);
}

.ps-back-in-stock-btn.ps-bis-subscribed {
    background: var(--ps-bis-subscribed, linear-gradient(135deg, #10b981 0%, #059669 100%));
    cursor: default;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

.ps-back-in-stock-btn.ps-bis-subscribed:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

.ps-back-in-stock-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.ps-bis-icon {
    font-size: 18px;
    line-height: 1;
}

.ps-bis-text {
    line-height: 1;
}

/* Modal Overlay */
.ps-bis-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    padding: 20px;
    overflow-y: auto;
}

/* Modal Content */
.ps-bis-modal-content {
    position: relative;
    max-width: 450px;
    margin: 10vh auto;
    background: #ffffff;
    border-radius: var(--ps-modal-radius, 12px);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: psModalSlideIn 0.3s ease-out;
}

@keyframes psModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.ps-bis-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-bis-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Modal Heading */
.ps-bis-modal-content h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.ps-bis-modal-content > p {
    margin: 0 0 25px;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

/* Form */
#psBackInStockForm {
    margin-bottom: 20px;
}

.ps-bis-email-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.ps-bis-email-input:focus {
    outline: none;
    border-color: var(--ps-primary, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ps-bis-submit-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: var(--ps-bis-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    border: none;
    border-radius: var(--ps-button-radius, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ps-bis-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.ps-bis-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ps-bis-spinner {
    display: inline-block;
    animation: psRotate 1s linear infinite;
}

@keyframes psRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Modal Messages */
.ps-bis-modal-message {
    display: none;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}

.ps-bis-modal-message.ps-bis-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.ps-bis-modal-message.ps-bis-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Privacy Note */
.ps-bis-privacy-note {
    margin: 15px 0 0;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
    .ps-bis-modal-content {
        margin: 5vh auto;
        padding: 30px 20px;
    }

    .ps-back-in-stock-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Message (below button) */
.ps-bis-message {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.ps-bis-message.ps-bis-success {
    background: #d1fae5;
    color: #065f46;
}

.ps-bis-message.ps-bis-error {
    background: #fee2e2;
    color: #991b1b;
}
