/**
 * Stock Notification Styling
 */

/* Stock Notification Button */
.btn-stock-notification {
    display: inline-block;
    padding: 12px 24px;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    max-width: 300px;
    text-align: center;
    margin-bottom: 10px;
}

.btn-stock-notification:hover:not(:disabled) {
    background-color: #229954;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-stock-notification:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-stock-notification.subscribed {
    background-color: #3a3728;
}

.btn-stock-notification.subscribed:hover {
    background-color: #504b38;
}

/* Stock Level Display */
.stock-level {
    font-size: 0.75em;
    font-weight: 700;
    color: #fff !important;
    padding: 0.35em 0.65em;
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-danger);
    display: inline-block;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

/* Notification Popup */
.stock-notification-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stock-notification-popup-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease;
}

.stock-notification-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.stock-notification-popup-close:hover {
    color: #333;
}

.stock-notification-popup-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
    padding-right: 30px;
}

.stock-notification-popup-success h3 {
    color: #27ae60;
}

.stock-notification-popup-error h3 {
    color: #e74c3c;
}

.stock-notification-popup-content p {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #666;
}

.stock-notification-popup-unsubscribe {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.stock-notification-popup-unsubscribe:hover:not(:disabled) {
    background-color: #c0392b;
}

.stock-notification-popup-unsubscribe:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .btn-stock-notification {
        font-size: 13px;
        padding: 10px 20px;
    }
    
    .stock-notification-popup-content {
        padding: 20px;
    }
    
    .stock-notification-popup-content h3 {
        font-size: 18px;
    }
    
    .stock-notification-popup-content p {
        font-size: 14px;
    }
}
