/* ================================================
   Product Arrival Notification Styles
   ================================================ */

/* ======================================
   Floating Notification Styles (NEW)
   ====================================== */

.floating-notification {
    position: fixed;
    top: 140px;
    right: 20px;
    max-width: calc(100% - 40px);
    padding: 8px 16px;
    background: #FAFAFA;
    border-radius: 8px;
    border: 1px solid #E5E5E5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 99999;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.notification-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.notification-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-text {
    color: #171717;
    font-size: 16px;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    line-height: 24px;
    word-wrap: break-word;
}

.notification-close {
    width: 24px;
    height: 24px;
    padding: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 0.7;
}

.notification-close svg {
    width: 10px;
    height: 10px;
}

/* Animation */
@keyframes slideInRight {
    from {
        transform: translateX(500px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive for Floating Notification */
@media (max-width: 768px) {
    .floating-notification {
        top: 100px;
        right: 10px;
        width: auto;
        max-width: calc(100% - 20px);
    }
    
    .notification-text {
        font-size: 14px;
        line-height: 20px;
    }
}

/* ======================================
   Original Button Styles
   ====================================== */

/* Wrapper */
.remind-me-wrapper {
    margin-bottom: 24px;
    text-align: left;
}

/* ปุ่ม Remind Me - รองรับทั้ง ID และ class */
#remind-me-btn,
.remind-me-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 300;
    border: 1px solid #616161;
    background-color: #fff;
    color: #616161;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0px;
    width: 100%;
    text-transform: none;
}

#remind-me-btn:hover:not(:disabled):not(.subscribed),
.remind-me-btn:hover:not(:disabled):not(.subscribed) {
    background-color: #616161;
    color: #fff;
    border-color: #616161;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#remind-me-btn:hover:not(:disabled):not(.subscribed) path,
.remind-me-btn:hover:not(:disabled):not(.subscribed) path {
    fill: #fff;
}

#remind-me-btn:active:not(:disabled):not(.subscribed),
.remind-me-btn:active:not(:disabled):not(.subscribed) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ปุ่มเมื่อสมัครแล้ว */
#remind-me-btn.subscribed,
.remind-me-btn.subscribed {
    background-color: #616161;
    color: #fff;
    border-color: #616161;
    cursor: default;
    opacity: 0.9;
    text-transform: none;
}

#remind-me-btn.subscribed path,
.remind-me-btn.subscribed path {
    fill: #fff;
}

/* ปุ่มเมื่อปิดการใช้งาน */
#remind-me-btn:disabled,
.remind-me-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    text-transform: none;
}

/* ปุ่มที่ต้องล็อกอิน */
#remind-me-btn.login-required,
.remind-me-btn.login-required {
    cursor: pointer;
}

/* ปุ่มยกเลิก */
#cancel-remind-btn,
.cancel-remind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 300;
    border: 1px solid #dc3545;
    background-color: #fff;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0px;
    width: 100%;
    text-transform: none;
    margin-top: 24px;
}

#cancel-remind-btn path,
.cancel-remind path {
    fill: #dc3545;
}

#cancel-remind-btn:hover:not(:disabled),
.cancel-remind:hover:not(:disabled) {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

#cancel-remind-btn:hover:not(:disabled) path,
.cancel-remind:hover:not(:disabled) path {
    fill: #fff;
}

#cancel-remind-btn:active:not(:disabled),
.cancel-remind:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2);
}

#cancel-remind-btn:disabled,
.cancel-remind:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ไอคอนกระดิ่ง */
.bell-icon {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

/* ไอคอนยกเลิก */
.cancel-icon {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
}

/* Animation สำหรับกระดิ่ง */
@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(-5deg);
    }
    60% {
        transform: rotate(5deg);
    }
    70% {
        transform: rotate(0deg);
    }
}

/* Loading icon */
.loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ข้อความตอบกลับ (เก็บไว้สำหรับ backward compatibility) */
#remind-me-message,
.remind-me-message {
    display: block;
    margin-top: 24px;
    padding: 0px;
    border-radius: 0px;
    font-size: 16px;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 8px 16px;
    border-radius: 0px;
    display: block;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 8px 16px;
    border-radius: 0px;
    display: block;
}

/* ข้อความให้ล็อกอิน */
.remind-me-login-notice {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.remind-me-login-notice a {
    color: #333;
    text-decoration: underline;
    font-weight: 600;
    margin: 0 4px;
}

.remind-me-login-notice a:hover {
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    #remind-me-btn,
    .remind-me-btn {
        width: 100%;
        justify-content: center;
    }

    #cancel-remind-btn,
    .cancel-remind {
        width: 100%;
        justify-content: center;
    }
    
    .remind-me-wrapper {
        text-align: center;
    }
}

/* Admin - Product list column */
.notification-count {
    display: inline-block;
    background-color: #2271b1;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}