/**
 * Frontend Styles - Actstorm Back In Stock
 *
 * @package Actstorm_Back_In_Stock
 */

/* CSS Variables */
:root {
    --actstorm-bis-button-bg: #2c3e50;
    --actstorm-bis-button-color: #ffffff;
    --actstorm-bis-border-radius: 8px;
    --actstorm-bis-transition: all 0.3s ease;
}

/* Form Wrapper */
.actstorm-bis-form-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.actstorm-bis-form-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: var(--actstorm-bis-border-radius);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Header */
.actstorm-bis-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.actstorm-bis-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--actstorm-bis-button-bg);
    border-radius: 50%;
    color: var(--actstorm-bis-button-color);
}

.actstorm-bis-icon svg {
    width: 20px;
    height: 20px;
}

.actstorm-bis-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

/* Description */
.actstorm-bis-description {
    margin: 0 0 16px;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

/* Form */
.actstorm-bis-form {
    margin: 0;
}

.actstorm-bis-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actstorm-bis-email {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: var(--actstorm-bis-border-radius);
    font-size: 15px;
    transition: var(--actstorm-bis-transition);
    background: #fff;
}

.actstorm-bis-email:focus {
    outline: none;
    border-color: var(--actstorm-bis-button-bg);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.15);
}

.actstorm-bis-email:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* Submit Button */
.actstorm-bis-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--actstorm-bis-button-bg);
    color: var(--actstorm-bis-button-color);
    border: none;
    border-radius: var(--actstorm-bis-border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--actstorm-bis-transition);
    white-space: nowrap;
}

.actstorm-bis-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.actstorm-bis-submit:active {
    transform: translateY(0);
}

.actstorm-bis-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.button-loading .spinner {
    animation: spin 1s linear infinite;
}

.button-loading .spinner .path {
    stroke-dasharray: 50;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 50;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 44, 50;
        stroke-dashoffset: -20;
    }

    100% {
        stroke-dasharray: 44, 50;
        stroke-dashoffset: -50;
    }
}

/* Messages */
.actstorm-bis-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--actstorm-bis-border-radius);
    font-size: 14px;
    line-height: 1.5;
}

.actstorm-bis-message.success {
    display: block !important;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.actstorm-bis-message.error {
    display: block !important;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner in button */
.button-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button-loading .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Login Required */
.actstorm-bis-login-required {
    margin-top: 12px;
    font-size: 14px;
}

.actstorm-bis-login-required a {
    color: var(--actstorm-bis-button-bg);
    text-decoration: underline;
}

/* Waitlist Info */
.actstorm-bis-waitlist-info {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    font-size: 13px;
    color: #6c757d;
}

.actstorm-bis-waitlist-info .waitlist-count {
    font-weight: 600;
    color: var(--actstorm-bis-button-bg);
}

/* Variation Form */
.actstorm-bis-variation-form {
    margin-top: 20px;
}

/* My Account Waitlist */
.actstorm-bis-my-account-waitlist {
    padding: 20px 0;
}

.actstorm-bis-my-account-waitlist h2 {
    margin-bottom: 20px;
}

.actstorm-bis-my-account-waitlist .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.actstorm-bis-my-account-waitlist .status-badge.in-stock {
    background: #d4edda;
    color: #155724;
}

.actstorm-bis-my-account-waitlist .status-badge.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.actstorm-bis-my-account-waitlist td img {
    width: 50px;
    height: auto;
    margin-right: 10px;
    vertical-align: middle;
}

.actstorm-bis-my-account-waitlist td a {
    display: inline-flex;
    align-items: center;
}

/* Responsive */
@media (max-width: 600px) {
    .actstorm-bis-input-group {
        flex-direction: column;
    }

    .actstorm-bis-email,
    .actstorm-bis-submit {
        width: 100%;
    }
}