/* public/css/common.css */

/* Variabili CSS per colori consistenti */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #ffd700;
    --success: #28a745;
    --light: #f8f9fa;
    --dark: #343a40;
}

/* Reset per navbar fissa */
body {
    padding-top: 76px; /* Altezza navbar fissa */
}

/* Navbar styling */
.navbar-brand {
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-item {
        margin: 5px 0;
    }
}

/* Stili comuni per tutte le pagine */
.container {
    max-width: 1200px;
}

.card {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: none;
    border-radius: 10px;
}

.btn {
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Social Share Buttons - Right Side */
.social-share-sidebar {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.social-share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    border: 2px solid white;
}

.social-share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-share-btn:hover::before {
    opacity: 1;
}

.social-share-btn:hover {
    transform: translateX(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Social Media Colors */
.social-share-btn.whatsapp { background: #25D366; }
.social-share-btn.facebook { background: #1877F2; }
.social-share-btn.instagram { 
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D, #F56040, #F77737, #FCAF45, #FFDC80);
}
.social-share-btn.twitter { background: #1DA1F2; }
.social-share-btn.linkedin { background: #0A66C2; }
.social-share-btn.telegram { background: #0088CC; }

.social-share-btn svg {
    width: 18px;
    height: 18px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .social-share-sidebar {
        right: 10px;
        gap: 6px;
    }
    
    .social-share-btn {
        width: 38px;
        height: 38px;
    }
    
    .social-share-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Hide on very small screens */
@media (max-width: 480px) {
    .social-share-sidebar {
        right: 5px;
    }
}

/* Stili per i filtri avanzati */
.searchable-select-container {
    position: relative;
}

.searchable-select-results {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.searchable-select-item:hover {
    background-color: #e9ecef;
}

/* Pulsanti clear migliorati */
.btn-clear {
    right: 25px !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-clear:hover {
    opacity: 1;
    background-color: #dc3545;
    color: white;
}

/* Accordion personalizzato */
.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0d6efd;
}

#activeFiltersBadge {
    font-size: 0.7em;
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .searchable-select-results {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-height: 60vh;
        z-index: 1060;
    }
    
    .btn-clear {
        right: 15px !important;
    }
}
/* Stili per il periodo personalizzato */
#customPeriodContainer {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    #customPeriodContainer .row {
        flex-direction: column;
    }
    
    #customPeriodContainer .col-6 {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Pulsanti clear migliorati */
.btn-clear {
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background-color: #dc3545 !important;
    color: white !important;
    transform: scale(1.1);
}

/* Stili per la validazione date */
.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v2.5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#dateError {
    font-size: 0.75rem;
}

/* Placeholder più visibile */
#customStartDate::placeholder,
#customEndDate::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Focus state */
#customStartDate:focus,
#customEndDate:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}