﻿/* ===== SFONDO ANIMATO ===== */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #007bff, #6f42c1, #00bcd4);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===== CONTENITORE LOGIN (EFFETTO VETRO) ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

/* ===== LOGO PROMOS SPA (ANIMAZIONE DA 90PX A 190PX) ===== */
.logo {
    width: 90px;
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 0;
    animation: logoGrow 1.5s ease-out forwards 0.2s;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

@keyframes logoGrow {
    0% {
        width: 90px;
        opacity: 0;
        transform: scale(0.5);
        filter: drop-shadow(0 0 0 rgba(255,255,255,0));
    }

    60% {
        width: 200px;
        opacity: 1;
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255,255,255,0.6));
    }

    100% {
        width: 190px;
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
    }
}

/* ===== INPUT E LABEL ===== */

/* Input bianchi */
.input-white {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #000 !important;
    border-radius: 10px;
    transition: all 0.25s ease-in-out;
    transform: scale(1);
}

    /* Effetto espansione e luce al focus */
    .input-white:focus {
        animation: inputBounce 0.4s ease-out forwards;
        box-shadow: 0 0 14px rgba(0, 123, 255, 0.5);
        border-color: #007bff !important;
    }

@keyframes inputBounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    80% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1.03);
    }
}

/* Label */
.form-floating label {
    color: #333 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Label in focus */
.form-floating.focused label {
    color: #007bff !important;
    transform: translateY(-2px);
}

/* ===== BOTTONE LOGIN ===== */
.login-btn {
    background: linear-gradient(90deg, #6f42c1, #007bff);
    border: none;
    transition: all 0.3s ease;
    border-radius: 10px;
}

    .login-btn.hovered {
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        background: linear-gradient(90deg, #007bff, #6f42c1);
    }

/* ===== SFONDO DECORATIVO ===== */
.login-bg::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: 10%;
    left: -10%;
    animation: float 6s ease-in-out infinite alternate;
}

.login-bg::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    bottom: 10%;
    right: -10%;
    animation: float 8s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    from {
        transform: translateY(0px);
    }

    to {
        transform: translateY(30px);
    }
}

@media (min-width: 992px) { /* Desktop */
    .glass-card {
        max-width: 480px;
    }
}

@media (min-width: 1400px) { /* Monitor grandi */
    .glass-card {
        max-width: 550px;
    }
}

/* === POSIZIONAMENTO E ANIMAZIONE BOTTOM SHEET === */
.modal-bottom {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 110%); /* parte fuori dallo schermo */
    width: 100%;
    max-width: 500px;
    margin: 0;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
    opacity: 0;
    z-index: 1060;
}

/* Mostra il modal (sale verso l’alto) */
.modal.show .modal-bottom {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* Chiude scorrendo verso il basso */
.modal.fade:not(.show) .modal-bottom {
    transform: translate(-50%, 110%);
    opacity: 0;
}

/* === STILE DEL CONTENITORE GLASS === */
.glass-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.25);
    color: #222;
    padding: 1rem 1.5rem;
}

/* === HEADER CON ICONA E TITOLO === */
.bottomsheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

    .bottomsheet-header .icon-circle {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #fff;
        margin-right: 10px;
    }

.icon-success {
    background: linear-gradient(135deg, #009639, #00b849);
}

.icon-error {
    background: linear-gradient(135deg, #dc3545, #ff4757);
}

.icon-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.icon-info {
    background: linear-gradient(135deg, #0dcaf0, #0056b3);
}

.bottomsheet-header h5 {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    flex: 1;
}

.bottomsheet-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .bottomsheet-close:hover {
        color: #333;
    }

/* === BODY DEL MESSAGGIO === */
.bottomsheet-body {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* === PULSANTI AZIONE === */
.bottomsheet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.bottomsheet-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bottomsheet-btn-primary {
    background-color: #de017b;
    color: #fff;
}

    .bottomsheet-btn-primary:hover {
        background-color: #b10063;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(222, 1, 123, 0.3);
    }

.bottomsheet-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

    .bottomsheet-btn-secondary:hover {
        background: #dee2e6;
    }

/* === VERSIONE MOBILE === */
@media (max-width: 768px) {
    .modal-bottom {
        left: 0;
        right: 0;
        transform: translateY(110%);
        width: 100vw;
        max-width: none;
        border-radius: 0;
    }

    .modal.show .modal-bottom {
        transform: translateY(0);
    }

    .glass-modal {
        border-radius: 16px 16px 0 0;
        width: 100%;
        margin: 0;
    }

    .bottomsheet-header,
    .bottomsheet-body,
    .bottomsheet-actions {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Barra drag handle superiore (effetto app mobile) */
    .glass-modal::before {
        content: "";
        display: block;
        width: 40px;
        height: 5px;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 3px;
        margin: 8px auto 12px auto;
    }
}

