/**
 * =====================================================
 * LATINBOOK - DIGITAL WELLBEING CSS
 * =====================================================
 * Estilos para el sistema de bienestar digital
 * @version 1.0
 * @date 2026-03-30
 * =====================================================
 */

/* ====================================
   WELLBEING NOTIFICATION
   ==================================== */
.wellbeing-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 420px;
    opacity: 0;
    transform: translateX(450px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wellbeing-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.wellbeing-notification-content {
    background: linear-gradient(135deg, 
        var(--card-bg, #1e1e2e) 0%, 
        rgba(0, 217, 54, 0.05) 100%);
    border: 2px solid #00D936;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 
        0 10px 40px rgba(0, 217, 54, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.wellbeing-icon {
    font-size: 42px;
    line-height: 1;
    flex-shrink: 0;
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.wellbeing-text {
    flex: 1;
}

.wellbeing-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #fff);
}

.wellbeing-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    line-height: 1.4;
}

.wellbeing-action {
    background: #00D936;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.wellbeing-action:hover {
    background: #00b82d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 217, 54, 0.4);
}

.wellbeing-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    transition: all 0.2s ease;
}

.wellbeing-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ====================================
   WELLBEING MODAL
   ==================================== */
.wellbeing-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wellbeing-modal.show {
    opacity: 1;
}

.wellbeing-modal.show .wellbeing-modal-content {
    transform: scale(1);
    opacity: 1;
}

.wellbeing-modal-content {
    background: var(--card-bg, #1e1e2e);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.wellbeing-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    font-size: 18px;
    transition: all 0.2s ease;
}

.wellbeing-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

.wellbeing-modal-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.wellbeing-modal-content h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #00D936 0%, #00ff66 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wellbeing-modal-subtitle {
    text-align: center;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    margin-bottom: 30px;
    font-size: 16px;
}

.wellbeing-stats-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(0, 217, 54, 0.1);
    border: 1px solid rgba(0, 217, 54, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #00D936;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wellbeing-tips {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.wellbeing-tips h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--text-primary, #fff);
}

.wellbeing-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wellbeing-tips li {
    padding: 8px 0;
    color: var(--text-secondary, rgba(255, 255, 255, 0.8));
    font-size: 14px;
    line-height: 1.6;
}

.wellbeing-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.wellbeing-actions .btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wellbeing-actions .btn-primary {
    background: linear-gradient(135deg, #00D936 0%, #00ff66 100%);
    color: white;
}

.wellbeing-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 217, 54, 0.4);
}

.wellbeing-actions .btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary, #fff);
}

.wellbeing-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.wellbeing-settings-link {
    display: block;
    text-align: center;
    color: #00D936;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wellbeing-settings-link:hover {
    color: #00ff66;
    text-decoration: underline;
}

/* ====================================
   BREAK MODE OVERLAY
   ==================================== */
.wellbeing-break-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    background: linear-gradient(135deg, #0a0014 0%, #1a0a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.wellbeing-break-overlay.active {
    opacity: 1;
}

.break-content {
    text-align: center;
    padding: 40px;
}

.break-icon {
    font-size: 120px;
    margin-bottom: 30px;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8;
    }
}

.break-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00D936 0%, #00ff66 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.break-timer {
    font-size: 72px;
    font-weight: 800;
    color: #00D936;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 30px rgba(0, 217, 54, 0.5);
}

.break-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

/* ====================================
   TOAST NOTIFICATIONS
   ==================================== */
.wellbeing-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10003;
    background: var(--card-bg, #1e1e2e);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 350px;
    font-size: 14px;
    font-weight: 500;
}

.wellbeing-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.wellbeing-toast.success {
    border-left: 4px solid #00D936;
    color: #00D936;
}

.wellbeing-toast.warning {
    border-left: 4px solid #FFD700;
    color: #FFD700;
}

.wellbeing-toast.error {
    border-left: 4px solid #FF3CAC;
    color: #FF3CAC;
}

.wellbeing-toast.info {
    border-left: 4px solid #667eea;
    color: #667eea;
}

/* ====================================
   LIMIT REACHED MODAL
   ==================================== */
.wellbeing-modal.limit-reached .wellbeing-modal-content {
    border: 2px solid #FF3CAC;
    background: linear-gradient(135deg, 
        var(--card-bg, #1e1e2e) 0%, 
        rgba(255, 60, 172, 0.05) 100%);
}

.wellbeing-modal.limit-reached .wellbeing-modal-icon {
    font-size: 80px;
}

.wellbeing-modal.limit-reached h2 {
    background: linear-gradient(135deg, #FF3CAC 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.limit-message {
    background: rgba(255, 60, 172, 0.1);
    border: 1px solid rgba(255, 60, 172, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.limit-message strong {
    color: #FF3CAC;
    font-size: 24px;
}

/* ====================================
   SETTINGS SECTION
   ==================================== */
#wellbeing-settings {
    background: rgba(0, 217, 54, 0.03);
    border: 1px solid rgba(0, 217, 54, 0.2);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
}

.wellbeing-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wellbeing-setting-item:last-child {
    border-bottom: none;
}

.wellbeing-setting-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.wellbeing-setting-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.wellbeing-setting-control {
    flex-shrink: 0;
}

.wellbeing-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wellbeing-toggle.active {
    background: #00D936;
}

.wellbeing-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.wellbeing-toggle.active::before {
    transform: translateX(24px);
}

.wellbeing-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary, #fff);
    font-size: 14px;
    width: 100px;
    text-align: center;
}

.wellbeing-input:focus {
    outline: none;
    border-color: #00D936;
    background: rgba(0, 217, 54, 0.05);
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 768px) {
    .wellbeing-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .wellbeing-notification-content {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .wellbeing-modal-content {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .wellbeing-stats-summary {
        grid-template-columns: 1fr;
    }

    .wellbeing-actions {
        flex-direction: column;
    }

    .break-timer {
        font-size: 56px;
    }

    .wellbeing-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }

    .wellbeing-setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ====================================
   ANIMATIONS
   ==================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ====================================
   DARK MODE SUPPORT
   ==================================== */
body.light-mode .wellbeing-notification-content {
    background: linear-gradient(135deg, #ffffff 0%, rgba(0, 217, 54, 0.05) 100%);
    border-color: #00D936;
    box-shadow: 0 10px 40px rgba(0, 217, 54, 0.15);
}

body.light-mode .wellbeing-modal-content {
    background: #ffffff;
    border-color: #e0e0e0;
}

body.light-mode .wellbeing-text h4,
body.light-mode .wellbeing-tips h3 {
    color: #1a1a1a;
}

body.light-mode .wellbeing-text p,
body.light-mode .wellbeing-tips li {
    color: rgba(0, 0, 0, 0.7);
}

body.light-mode .wellbeing-toast {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body.light-mode .wellbeing-input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}
