/* Google Address Autocomplete for WooCommerce - Style Moderne et Épuré */

/* -------------------------------------------------
 * 0. Variables CSS (Pour la cohérence des champs)
 * ------------------------------------------------- */
 :root {
    /* Définit la hauteur standard pour tous les champs (env. 48px) */
    --gaawc-input-height: 48px;
    --gaawc-border-color: #cbd5e1;
    --gaawc-border-radius: 8px;
  }
  
  /* -------------------------------------------------
   * 1. Google Autocomplete Dropdown Styling (.pac-container)
   * ------------------------------------------------- */
  
  .pac-container {
      /* Structure, Ombre et Bordure */
      border-radius: var(--gaawc-border-radius);
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
      border: 1px solid #e2e8f0;
      margin-top: 5px;
      overflow: hidden;
      /* Padding ajusté : Padding supérieur uniquement, le bas sera géré par le logo (:after) */
      padding: 8px 0 0 0;
      background-color: #fff;
      font-family: inherit;
      z-index: 1050;
  }
  
  /* Style d'un élément individuel (suggestion) */
  .pac-item {
      padding: 12px 18px;
      line-height: 1.4;
      color: #333;
      border: none;
      cursor: pointer;
      transition: background-color 0.2s ease-in-out;
      display: flex;
      align-items: center;
  }
  
  /* Effet au survol */
  .pac-item:hover,
  .pac-item-selected {
      background-color: #f8fafc;
  }
  
  /* Masquage de l'icône */
  .pac-icon,
  .pac-icon-marker {
      display: none !important;
  }
  
  /* Style du texte principal (Nom de la rue) */
  .pac-item-query {
      font-size: 15px;
      font-weight: 500;
      color: #1e293b;
  }
  
  /* Style des détails secondaires (Pays, Ville, etc.) */
  .pac-item > span:not(.pac-item-query):not(.pac-icon) {
      font-size: 13px;
      color: #64748b;
      margin-left: 6px;
  }
  
  /* Style du texte correspondant à la saisie */
  .pac-matched {
      font-weight: 600;
      color: #0f172a;
  }
  
  /* Ajustement du logo "Powered by Google" */
  .pac-container:after {
      padding: 10px 18px;
      background-color: #fff;
      font-size: 11px;
      display: block;
      text-align: right;
      margin-top: 8px;
      border-top: 1px solid #f1f5f9;
  }
  
  /* -------------------------------------------------
   * 2. General Checkout Field Enhancement (Cohérence Visuelle)
   * ------------------------------------------------- */
  
  /* Style général des champs (Inputs standard et Selects natifs) */
  .woocommerce-checkout .form-row input.input-text,
  .woocommerce-checkout .form-row textarea,
  .woocommerce-checkout .form-row select {
      padding: 12px 15px !important;
      border-radius: var(--gaawc-border-radius) !important;
      border: 1px solid var(--gaawc-border-color) !important;
      transition: border-color 0.2s, box-shadow 0.2s;
      /* Assurer une hauteur cohérente pour les selects natifs (avant que JS ne les transforme) */
      height: var(--gaawc-input-height);
      box-sizing: border-box; /* Important pour que padding/border soient inclus dans la hauteur */
  }
  
  
  /* État Focus */
  .woocommerce-checkout .form-row input.input-text:focus,
  .woocommerce-checkout .form-row textarea:focus,
  .woocommerce-checkout .form-row select:focus,
  /* Ajout de l'état focus pour Select2 lorsqu'il est actif ou ouvert */
  .select2-container--default.select2-container--open .select2-selection--single,
  .select2-container--default.select2-container--focus .select2-selection--single {
      /* Utilise la variable du thème si disponible, sinon utilise la couleur en fallback */
      border-color: var(--primary-color, #f2639c) !important;
      /* Effet de halo subtil */
      box-shadow: 0 0 0 3px rgba(242, 99, 156, 0.2) !important;
      outline: none;
  }
  
  /* -------------------------------------------------
   * 3. Ajustements Spécifiques Select2 (Correction Alignement Vertical)
   * ------------------------------------------------- */
  
  /* Conteneur principal Select2 */
  .select2-container--default .select2-selection--single {
      /* FIX: Forcer la hauteur pour la cohérence */
      height: var(--gaawc-input-height) !important;
      border-radius: var(--gaawc-border-radius) !important;
      border: 1px solid var(--gaawc-border-color) !important;
  
      /* FIX: Utilisation de Flexbox pour un centrage vertical parfait */
      display: flex !important;
      align-items: center !important;
  }
  
  /* Élément interne contenant le texte */
  .select2-container--default .select2-selection--single .select2-selection__rendered {
      /* FIX: Réinitialiser la hauteur de ligne pour permettre à Flexbox de centrer */
      line-height: normal !important;
      padding-left: 15px !important;
      padding-right: 30px !important;
      /* S'assurer qu'il n'y a pas de marges ou paddings verticaux parasites */
      margin: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
  }
  
  /* Flèche du Select2 */
  .select2-container--default .select2-selection--single .select2-selection__arrow {
      /* Centre la flèche verticalement dans la hauteur définie */
      height: var(--gaawc-input-height) !important;
      top: 0 !important;
      right: 10px !important;
  }