﻿/* ============================================
   PAGINA CREA CACCE (/crea) - CARD CACCE E TESORI
   Stile per le card nella lista
   ============================================ */

/* CACCE CARD ESPANDIBILI */
.cacce-list {
    display: flex;
    flex-direction: column;
    gap: 1rem !important;
}

/* CARD PRINCIPALE */
.caccia-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

    .caccia-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }

/* CONTAINER IMMAGINE */
.caccia-card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* FORZA proporzione 16:9 */
    overflow: hidden;
    background: linear-gradient(135deg, #0a2a2a 0%, #1a3b3a 100%); /* Blu petrolio */
}

.caccia-card-image {
    width: 100%;
    height: 100%;
}

    .caccia-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.caccia-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

    .caccia-card-image-placeholder i {
        font-size: 3rem;
        margin-bottom: 0.5rem;
        opacity: 0.8;
    }

    .caccia-card-image-placeholder span {
        font-size: 0.9rem;
        font-weight: 500;
        opacity: 0.9;
    }


/* PULSANTE PUBBLICA/ARCHIVIA SOVRAPPOSTO */
.caccia-card-pubblica-btn,
.caccia-card-archivia-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.caccia-card-pubblica-btn {
    background: rgba(25, 135, 84, 0.9);
    color: white;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.4);
}

    .caccia-card-pubblica-btn:hover {
        background: rgba(20, 108, 67, 0.95);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(25, 135, 84, 0.5);
    }

.caccia-card-archivia-btn {
    background: rgba(108, 117, 125, 0.9);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.4);
}

    .caccia-card-archivia-btn:hover {
        background: rgba(73, 80, 87, 0.95);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(108, 117, 125, 0.5);
    }

/* CONTENUTO CARTA */
.caccia-card-content {
    cursor: pointer;
    padding: 0rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.caccia-card-header {
    flex: 1;
    cursor: pointer;
}

/* TITOLO E CRUD */
.caccia-card-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
    margin-top: 0.2rem;
    padding: 0.2rem;
}

.caccia-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    flex: 1;
}

.caccia-card-crud {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-card {
    background: none;
    border: 1px solid #dee2e6;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #6c757d;
    transition: all 0.2s ease;
    padding: 0;
}

    .btn-icon-card:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
        color: #495057;
    }

    .btn-icon-card.btn-icon-danger {
        color: #dc3545;
        border-color: #f8d7da;
    }

        .btn-icon-card.btn-icon-danger:hover {
            background: #fff5f5;
            border-color: #dc3545;
            color: #dc3545;
        }


/* STILE ICONA MAPPA */
.btn-icon-map {
    color: #198754;
    border-color: #d1e7dd;
}

    .btn-icon-map:hover {
        background: #d1e7dd;
        border-color: #198754;
        color: #0f5132;
    }

/* COMUNE E AUTORE */
.caccia-card-location {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

    .caccia-card-location span {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .caccia-card-location i {
        font-size: 0.85rem;
        color: #adb5bd;
    }

/* METRICHE ALLINEATE */
.caccia-card-metrics {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.caccia-card-metric {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.9rem;
    color: #495057;
}

    .caccia-card-metric i {
        color: #0d6efd;
        font-size: 0.9rem;
    }

    .caccia-card-metric span {
        font-weight: 500;
    }

    .caccia-card-metric:last-child {
        min-width: 200px;
        justify-content: flex-end;
    }

        .caccia-card-metric:last-child span {
            display: inline;
            text-align: right;
            white-space: nowrap;
            max-width: 100%;
            overflow: visible;
        }

/* Separatore tra le date */
.caccia-card-dates-separator {
    margin: 0 4px;
    color: #adb5bd;
}

/* DATE */
.caccia-card-dates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.1rem;
}

    .caccia-card-dates i {
        color: #adb5bd;
        font-size: 0.85rem;
    }

    .caccia-card-dates span {
        font-weight: 500;
    }

/* FREECCIA ESPANSIONE */
.caccia-card-expand {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    color: #adb5bd;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

    .caccia-card-expand:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
    }

/* CONTENUTO ESPANSO (MANTIENI STILE ESISTENTE) */
.caccia-card-expanded {
    background: #0a1a2a !important; /* Blu scuro colonna */
    border-top: 1px solid #1a2a3a !important;
    padding: 1rem 1.25rem;
}

/* CONTENUTO ESPANSO (TESORI) */
.caccia-card-expanded {
    border-top: 1px solid #e9ecef;
    padding: 1.25rem;
    background: #f8f9fa;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tesori-caccia-header {
    background: #044280;
    border: 1px solid #2a3a4a;
    border-left: 3px solid #4ec9b0; /* Turchese VS Code */
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

    .tesori-caccia-header h6 {
        margin: 0;
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .tesori-caccia-header h6 i {
            color: #4ec9b0;
            font-size: 0.9rem;
        }

    .tesori-caccia-header .btn {
        background: #4ec9b0;
        color: #0a1a2a;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 4px;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        border: none;
        font-weight: 500;
    }

        .tesori-caccia-header .btn:hover {
            background: #ffb300;
            color: #0a1a2a;
        }

.tesori-caccia-header-left h6 {
    margin: 0;
    font-size: 1rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tesori-caccia-header-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap; /* Aggiungi questa riga */
    white-space: nowrap; /* Aggiungi anche questa */
}

/* Pulsante Chiudi semplice (solo icona) */
.btn-close-simple {
    width: 32px;
    height: 32px;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    background: white;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

    .btn-close-simple:hover {
        border-color: #a0aec0;
        color: #4a5568;
        background-color: #f7fafc;
        transform: scale(1.05);
    }

    .btn-close-simple:active {
        transform: scale(0.95);
    }


.tesori-list {
    background: #0a1a2a;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-tesori {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    background: white;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

    .empty-tesori i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
        color: #adb5bd;
    }

/* TESORI NELLA LISTA - NUOVA STRUTTURA */
.tesoro-item {
    background: #1a2a3a !important; /* Blu medio */
    border: 1px solid #2a3a4a !important;
    color: #e6e6e6 !important; /* Testo chiaro */
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .tesoro-item.tesoro-semplice {
     border-left: 3px solid #4ec9b0 !important;  /* Turchese */
    }

    .tesoro-item.tesoro-avanzato {
        border-left: 3px solid #ffb300 !important; /* Oro */
    }

    .tesoro-item:hover {
        background-color: #f8f9fa;
        border-color: #adb5bd;
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

.tesoro-item-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tesoro-item-icon {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.tesoro-item.tesoro-semplice .tesoro-item-icon {
    color: #0dcaf0;
}

.tesoro-item.tesoro-avanzato .tesoro-item-icon {
    color: #fd7e14;
}

.tesoro-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tesoro-item.tesoro-isolato-attivo {
    background: #2a3a4a !important; /* Blu più chiaro */
    border: 2px solid #ffb300 !important; /* Bordo oro */
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

/* RIGA 1: Titolo e numero sequenza */
.tesoro-item-riga1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.tesoro-item-titolo {
    font-weight: 600;
    color: #ffffff !important;
    font-size: 1rem;
    flex: 1;
}

.tesoro-item-numero {
    background: #0d6efd;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* RIGA 2: Enigma */
.tesoro-item-enigma {
    margin: 0.25rem 0;
}

.tesoro-enigma-text {
    font-size: 0.9rem;
    color: #cccccc !important;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tesoro-enigma-empty {
    font-size: 0.85rem;
    color: #adb5bd;
    font-style: italic;
}

/* RIGA 3: Tipo tesoro */
.tesoro-item-footer {
    display: flex;
    align-items: center;
    margin-top: 0.25rem;
}

.tesoro-item-tipo {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #cccccc !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

    .tesoro-item-tipo i {
        font-size: 0.75rem;
    }

.tesoro-item.tesoro-semplice .tesoro-item-tipo {
    background: #e3f2fd;
    color: #0d6efd;
}

.tesoro-item.tesoro-avanzato .tesoro-item-tipo {
    background: #fff3e0;
    color: #fd7e14;
}

/* FORM ESPANSION TESORO */
.tesoro-expanded-form {
    margin: 1rem 0 0 0;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tesoro-expanded-form h6 {
    color: #495057;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.1rem;
    font-weight: 600;
}

/* RESPONSIVE CARD */
@media (max-width: 768px) {
    .caccia-card-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .caccia-card-title-section .caccia-card-expand {
        margin-left: auto;
        margin-right: 0.5rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .caccia-card-crud {
        align-self: flex-end;
    }

    .caccia-card-metrics {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .caccia-card-location {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tesori-caccia-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .tesoro-item-riga1 {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tesoro-item-numero {
        align-self: flex-start;
    }
}




/* ============================================
   THUMBNAIL TESORI NELLA LISTA
   ============================================ */

.tesoro-item-thumbnail {
    width: 120px; /* ← PIÙ GRANDE */
    height: 120px; /* ← PIÙ GRANDE */
    flex-shrink: 0;
    border-radius: 8px; /* ← Angoli più arrotondati */
    overflow: hidden;
    border: 2px solid #3e3e42;
    background: #1a2a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); /* ← Ombra */
}

    .tesoro-item-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ritaglio intelligente */
        transition: transform 0.3s ease;
    }

.tesoro-item:hover .tesoro-item-thumbnail img {
    transform: scale(1.1);
}

.tesoro-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #569cd6; /* Blu VS Code */
    font-size: 1.5rem;
    background: #252526;
}

/* Sposta icona tipo dentro l'info */
.tesoro-item-info {
    position: relative;
    padding-left: 0.5rem;
}

/* Icona tipo spostata in alto a destra */
.tesoro-item-icon {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.9rem;
    color: #4ec9b0; /* Turchese */
}






.btn-disabilitato-visualmente {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}




/* Badge stato caccia */
.caccia-card-status {
    margin-left: 2rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

    .status-badge i {
        font-size: 0.7rem;
    }

.status-bozza {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-pubblicata {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-archiviata {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Pulsanti azione per stato */
.btn-action-success {
    background-color: #28a745;
    color: white;
}

    .btn-action-success:hover {
        background-color: #218838;
    }

.btn-action-warning {
    background-color: #ffc107;
    color: #212529;
}

    .btn-action-warning:hover {
        background-color: #e0a800;
    }



