/*
 * SCI Style - Styles spécifiques pour les fonctionnalités SCI
 * Version: 1.0.0
 */

/* ========================================
   FORMULAIRE DE RECHERCHE SCI
   ======================================== */

/* Style spécifique pour le formulaire de recherche SCI */
form#sci-search-form {
    display: flex !important;
    justify-content: space-between !important;
}

/* Styles pour le formulaire de recherche SCI dans l'admin */
#sci-search-form {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    background: #f8f9fa !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* Container pour label et select */
#sci-search-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: flex-start !important;
}

#sci-search-form label {
    font-weight: 400 !important;
    color: #495057 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    background: none !important;
    border: none !important;
    margin-bottom: 8px !important;
}

#sci-search-form select {
    width: auto !important;
    min-width: 200px !important;
    max-width: 300px !important;
    height: 44px !important;
    padding: 0.5rem 1rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    margin: 0 !important;
    background: white !important;
    transition: all 0.2s ease !important;
    color: #333 !important;
}

#sci-search-form select:focus {
    border-color: #28a745 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Responsive pour le formulaire de recherche dans l'admin */
@media (max-width: 768px) {
    #sci-search-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    #sci-search-form .form-group {
        align-items: stretch !important;
    }
    
    #sci-search-form label {
        white-space: normal !important;
        margin-bottom: 0.25rem !important;
    }
    
    #sci-search-form select {
        width: 100% !important;
        min-width: auto !important;
    }
    
    #sci-search-form button {
        align-self: stretch !important;
        width: 100% !important;
    }
}

/* ========================================
   STYLES POUR LE FRONTEND SCI
   ======================================== */

button#search-btn {
    margin-left: 25px !important;
}

/* Styles spécifiques pour le formulaire de recherche SCI dans le frontend */
.sci-frontend-wrapper #sci-search-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: end !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    background: #f8f9fa !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    margin-bottom: 1.5rem !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.sci-frontend-wrapper #sci-search-form {
    background-color: white !important;
    box-shadow: none !important;
    border: none !important;
}

.sci-frontend-wrapper #sci-search-form label {
    font-weight: 500 !important;
    color: #495057 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    background: none !important;
    border: none !important;
}

.sci-frontend-wrapper #sci-search-form select {
    width: auto !important;
    min-width: 200px !important;
    max-width: 300px !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    margin: 0 !important;
    background: white !important;
    transition: all 0.2s ease !important;
}

.sci-frontend-wrapper #sci-search-form select:focus {
    border-color: #28a745 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.sci-frontend-wrapper #sci-search-form button {
    margin: 0 !important;
}

/* Container pour label et select dans le frontend */
.sci-frontend-wrapper #sci-search-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: flex-start !important;
}

.sci-frontend-wrapper #sci-search-form .form-group label {
    font-weight: 500 !important;
    color: #495057 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    background: none !important;
    border: none !important;
}

.sci-frontend-wrapper #sci-search-form .form-group select {
    width: auto !important;
    min-width: 200px !important;
    max-width: 300px !important;
    height: 44px !important;
    padding: 0.5rem 1rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    margin: 0 !important;
    background: white !important;
    transition: all 0.2s ease !important;
}

.sci-frontend-wrapper #sci-search-form .form-group select:focus {
    border-color: #28a745 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Responsive pour le formulaire de recherche dans le frontend */
@media (max-width: 768px) {
    .sci-frontend-wrapper #sci-search-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .sci-frontend-wrapper #sci-search-form .form-group {
        align-items: stretch !important;
    }
    
    .sci-frontend-wrapper #sci-search-form .form-group label {
        white-space: normal !important;
        margin-bottom: 0.25rem !important;
    }
    
    .sci-frontend-wrapper #sci-search-form .form-group select {
        width: 100% !important;
        min-width: auto !important;
    }
}

/* ========================================
   BOUTONS SCI
   ======================================== */

/* Styles verts pour les boutons dans l'admin */
button.button-primary,
.button.button-primary,
button.button-secondary,
.button.button-secondary {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    line-height: 1.4 !important;
    text-align: center !important;
    vertical-align: middle !important;
    user-select: none !important;
    border: 1px solid transparent !important;
}

#sci-search-form button:focus,
#sci-search-form .button:focus,
button.button-primary:focus,
.button.button-primary:focus,
button.button-secondary:focus,
.button.button-secondary:focus {
    outline: 0px !important;
    outline-offset: 2px !important;
}

#sci-search-form button:disabled,
#sci-search-form .button:disabled,
button.button-primary:disabled,
.button.button-primary:disabled,
button.button-secondary:disabled,
.button.button-secondary:disabled {
    background: #e9ecef !important;
    color: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6 !important;
}

/* Correction du problème de chargement sur les boutons dans l'admin */
#sci-search-form button:disabled::after,
#sci-search-form .button:disabled::after,
button.button-primary:disabled::after,
.button.button-primary:disabled::after,
button.button-secondary:disabled::after,
.button.button-secondary:disabled::after {
    display: none !important;
}

/* ========================================
   TABLES SCI
   ======================================== */

/* Styles pour les tables SCI */
.sci-frontend-wrapper table.sci-table th, 
.sci-frontend-wrapper .sci-table th, 
.sci-frontend-wrapper table.sci-table td, 
.sci-frontend-wrapper .sci-table td {
    color: #545454 !important;
    font-size: 13px !important;
}

.sci-frontend-wrapper table.sci-table th,
.sci-frontend-wrapper .sci-table th {
    background: #f8f9fa !important;
    padding: 12px 12px !important;
    text-align: left !important;
}

/* ========================================
   BOUTONS FAVORIS SCI
   ======================================== */

/* Styles spécifiques pour les boutons favoris */
.sci-frontend-wrapper button.fav-btn,
button.fav-btn,
.sci-frontend-wrapper .fav-btn,
.fav-btn,
.sci-frontend-wrapper button.favorite-btn,
button.favorite-btn,
.sci-frontend-wrapper .favorite-btn,
.favorite-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    transition: all 0.2s ease !important;
    font-size: 18px !important;
    color: #ccc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

.sci-frontend-wrapper button.fav-btn:hover,
button.fav-btn:hover,
.sci-frontend-wrapper .fav-btn:hover,
.fav-btn:hover,
.sci-frontend-wrapper button.favorite-btn:hover,
button.favorite-btn:hover,
.sci-frontend-wrapper .favorite-btn:hover,
.favorite-btn:hover {
    transform: scale(1.1) !important;
    color: #ffd700 !important;
    background: #f0f0f0 !important;
}

/* État actif des favoris */
.sci-frontend-wrapper button.favorite-btn.active,
button.favorite-btn.active,
.sci-frontend-wrapper .favorite-btn.active,
.favorite-btn.active,
.sci-frontend-wrapper button.favorite-btn.favori,
button.favorite-btn.favori,
.sci-frontend-wrapper .favorite-btn.favori,
.favorite-btn.favori {
    color: #ffd700 !important;
}

/* ========================================
   STATUT DE CONTACT SCI
   ======================================== */

/* Styles pour le statut de contact des SCI */
.contact-status {
    display: inline-block !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
}

.contact-status.contacted {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.contact-status.not-contacted {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* ========================================
   POPUP LETTRE SCI - STYLES COMPLETS (copiés de Gestion des leads)
   ======================================== */

/* Modal d'édition des leads - Styles complets */
.my-istymo-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
}

.my-istymo-modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
}

.my-istymo-modal.my-istymo-show {
    opacity: 1 !important;
    visibility: visible !important;
}

.my-istymo-modal.my-istymo-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

.my-istymo-modal-content {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    max-width: 700px !important;
    width: 95% !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    transform: scale(0.95) translateY(20px) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    z-index: 1 !important;
    border: 1px solid #e5e7eb !important;
    padding: 25px !important;
}

.my-istymo-modal.my-istymo-show .my-istymo-modal-content {
    transform: scale(1) translateY(0) !important;
}

/* ========================================
   STYLES POUR LE RÉCAPITULATIF DE CAMPAGNE
   ======================================== */

/* Récapitulatif de campagne */
.campaign-recap {
    max-height: 500px !important;
    overflow-y: auto !important;
    margin-bottom: 20px !important;
}

.recap-section {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 15px !important;
}

.recap-section h3 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    color: #495057 !important;
    font-size: 1.1em !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.recap-item {
    margin-bottom: 12px !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #e9ecef !important;
}

.recap-item:last-child {
    border-bottom: none !important;
}

.pricing-table {
    background: white !important;
    border-radius: 6px !important;
    padding: 15px !important;
}

.pricing-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.pricing-row:last-child {
    border-bottom: none !important;
}

.total-row {
    background: #e7f3ff !important;
    margin: 10px -15px -15px -15px !important;
    padding: 15px !important;
    border-radius: 0 0 6px 6px !important;
    font-size: 1.1em !important;
}

.services-list {
    background: white !important;
    border-radius: 4px !important;
    padding: 15px !important;
}

.service-item {
    padding: 6px 0 !important;
    color: #28a745 !important;
    font-weight: 500 !important;
}

.recap-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    margin-top: 20px !important;
}

/* ========================================
   STYLES POUR LE PROCESSUS DE PAIEMENT
   ======================================== */

/* En-tête de paiement */
.payment-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

.payment-summary-compact {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 15px !important;
    align-items: center !important;
}

.summary-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #e9ecef !important;
}

.summary-item:last-child {
    border-bottom: none !important;
}

/* Container de traitement */
.processing-container {
    text-align: center !important;
    padding: 40px 20px !important;
}

.processing-icon {
    font-size: 1.2em !important;
    font-weight: 600 !important;
    color: #0073aa !important;
    margin-bottom: 15px !important;
}

.processing-text {
    font-size: 1.1em !important;
    color: #495057 !important;
    margin-bottom: 20px !important;
}

.processing-subtext {
    font-size: 0.9em !important;
    color: #6c757d !important;
    margin-top: 10px !important;
}

/* Barre de progression */
.progress-bar {
    width: 100% !important;
    height: 6px !important;
    background: #e9ecef !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    margin: 20px 0 !important;
}

.progress-bar-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #0073aa 0%, #28a745 100%) !important;
    border-radius: 3px !important;
    transition: width 0.3s ease !important;
    width: 0% !important;
}

/* Container de checkout */
#checkout-container {
    margin-top: 20px !important;
}

#embedded-checkout {
    background: white !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 20px !important;
}

/* Succès de paiement */
.success-container {
    text-align: center !important;
    padding: 40px 20px !important;
}

.success-icon {
    font-size: 2em !important;
    color: #28a745 !important;
    margin-bottom: 20px !important;
}

.success-container h3 {
    color: #28a745 !important;
    margin-bottom: 15px !important;
}

.success-actions {
    margin-top: 30px !important;
}

#sending-status {
    color: #6c757d !important;
    font-size: 0.9em !important;
    margin-top: 10px !important;
}


/* ========================================
   RESPONSIVE GÉNÉRAL
   ======================================== */

@media (max-width: 768px) {
    .sci-frontend-wrapper #sci-search-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .sci-frontend-wrapper #sci-search-form label {
        white-space: normal !important;
        margin-bottom: 0.25rem !important;
    }
    
    .sci-frontend-wrapper #sci-search-form select {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .sci-frontend-wrapper #sci-search-form button {
        align-self: stretch !important;
        width: 100% !important;
    }
}
