/* ==========================================================================
   Stock Notification - Product Page
   ========================================================================== */

.stock-notification-wrapper {
    margin: 15px 0;
}

.stock-notification-wrapper .notify-me-btn {
    background-color: #1979c3;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    width: 100%;
    max-width: 300px;
}

.stock-notification-wrapper .notify-me-btn:hover {
    background-color: #006bb4;
}

/* ==========================================================================
   Stock Notification - Modal
   ========================================================================== */

.stock-notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-notification-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.stock-notification-modal .modal-content {
    position: relative;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.stock-notification-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

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

.stock-notification-modal .modal-title {
    margin: 0 0 10px;
    font-size: 22px;
    color: #333;
}

.stock-notification-modal .modal-description {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
}

.stock-notification-form .field {
    margin-bottom: 15px;
}

.stock-notification-form .label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.stock-notification-form .label .optional {
    font-weight: normal;
    color: #999;
}

.stock-notification-form .input-text {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.stock-notification-form .input-text:focus {
    border-color: #1979c3;
    outline: none;
}

.stock-notification-form .submit-btn {
    background-color: #1979c3;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    width: 100%;
}

.stock-notification-form .submit-btn:hover {
    background-color: #006bb4;
}

.stock-notification-form .submit-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.notification-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.notification-message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.notification-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* ==========================================================================
   Stock Notification - Category Listing Badge
   ========================================================================== */

.stock-badge {
    margin-top: 8px;
    padding: 0;
}

.stock-badge-notify {
    display: inline-block;
}

.stock-badge-notify .stock-badge-link {
    text-decoration: none;
}

.stock-badge-notify .stock-badge-text {
    display: inline-block;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #757575;
    line-height: 1.4;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.stock-badge-notify .stock-badge-link:hover .stock-badge-text {
    background-color: #e8f0fe;
    border-color: #1979c3;
    color: #1979c3;
}

/* ========================================================================
   Stock Notification - Category Listing Action Replacement
   ======================================================================== */

.product-item-actions .actions-primary .notify-when-available {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.3;
}

.product-item-actions .actions-primary .notify-when-available span {
    display: block;
    width: 100%;
}

/* ==========================================================================
   RTL Support for Arabic
   ========================================================================== */

.stock-notification-modal .modal-content:dir(rtl) .modal-close,
body[dir="rtl"] .stock-notification-modal .modal-close,
html[dir="rtl"] .stock-notification-modal .modal-close {
    right: auto;
    left: 15px;
}

html[lang="ar"] .stock-notification-modal .modal-close,
html[lang^="ar"] .stock-notification-modal .modal-close {
    right: auto;
    left: 15px;
}
