@import url('/static/css/theme.css');

:root {
    --primary-dark: #198754;
    --primary-light: #e9f7ef;
    --secondary-color: #6c757d;
    --background: #f8f9fa;
    --surface: #ffffff;
    --surface-light: #f1f3f4;
    --text-primary: #222;
    --text-secondary: #6c757d;
    --accent: #4fd1c7;
    --success: #10b981;
    --success-color: #28a745;
    --success-dark: #1e7e34;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}


/* Bottoni piccoli stile admin */
.btn-sm {
    display: inline-block;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin: 0 2px;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #3498b6;
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-success:hover {
    background: var(--success-dark);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
}

.btn-warning:hover {
    background: #d97706;
}

/* Input piccoli */
.input-sm {
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    width: 90%;
    max-width: 320px;
    box-sizing: border-box;
}

/* Switch/Slider custom per toggle visibilità */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    vertical-align: middle;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px #0002;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.slider.round {
    border-radius: 22px;
}

.slider.round:before {
    border-radius: 50%;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: white;
}

body {
    @keyframes selfiePulse {
        0% { transform: scale(1); }
        25% { transform: scale(1.13); }
        50% { transform: scale(1.2); }
        75% { transform: scale(1.25); }
        100% { transform: scale(1); }
    }
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

/* Puntino custom per affiliato */
.affiliato-cursor #affiliato-dot-cursor {
    position: fixed;
    width: 18px;
    height: 18px;
    background: #48aed3;
    border-radius: 50%;
    box-shadow: 0 0 8px #48aed3aa;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    transition: opacity 0.2s;
}

/* Nascondi il cursore classico per affiliato */
.affiliato-cursor {
    cursor: none !important;
}

/* Scrollbar ingrandita per affiliato */
.affiliato-cursor ::-webkit-scrollbar {
    width: 18px;
    background: #e0e0e0;
}
.affiliato-cursor ::-webkit-scrollbar-thumb {
    background: #48aed3;
    border-radius: 9px;
    border: 3px solid #fff;
}
.affiliato-cursor ::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 9px;
}
}

/* Package Info Bar - Common style across all pages */
.package-info-bar {
    background-color: #f0f8ff;
    padding: 8px 16px;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

.package-info {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
}

.package-name {
    font-weight: bold;
    color: var(--primary-color);
}

.package-remaining,
.package-expiry {
    color: var(--text-secondary);
}

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    padding-right: 16px;
    z-index: 1000;
    background-color: #48aed3;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info-item {
    display: flex;
    flex-direction: column;
}

.user-info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.user-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.user-info-token {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-token-type {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.info-token-balance {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fbbf24;
    text-align: center;
    transition: all 0.3s ease;
}

.info-token-balance:hover {
    transform: scale(1.05);
}

.result-message {
    text-align: center;
    margin: 12px 0;
    font-weight: 600;
    color: var(--primary-dark);
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.result-message.error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

.result-message.success {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.result-message.warning {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
}

.logo {
    height: 200px;
}

.logo img {
    display: flex;
    align-items: center;
    height: 100%;
}

.vertical-divider {
    width: 1px;
    height: 30px;
    background-color: white;
    opacity: 0.5;
}

.logout-link {
    color: white;
    text-align: center;
    font-size: smaller;
}

.logout-link a {
    color: white;
    text-decoration: none;
}

.logout-link a:hover {
    font-weight: bold;
}


/*--------------------------------------------------*/
.center_text,
.text-center,
.centre-text,
.center-text,
.text-center {
    text-align: center;
}

/* =============================================== */
/* 🔔 NOTIFICHE / NOTIFICATIONS */
/* =============================================== */

.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    max-width: 320px;
    word-wrap: break-word;
}

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

.notification.hide {
    opacity: 0;
    transform: translateX(120%);
}

.notification.info {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-left-color: #60a5fa;
}

.notification.success {
    background: linear-gradient(135deg, var(--success), #059669);
    border-left-color: #34d399;
}

.notification.error {
    background: linear-gradient(135deg, var(--error), #dc2626);
    border-left-color: #f87171;
}

.notification.warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    border-left-color: #fbbf24;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    opacity: 0.8;
    z-index: -1;
}

.notification:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* Responsive per schermi piccoli */
@media (max-width: 768px) {
    .notification {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .notification.show {
        transform: translateY(0);
    }

    .notification.hide {
        transform: translateY(-100%);
    }

    .notification:hover {
        transform: translateY(-2px) scale(1.01);
    }
}