/* Pigeon Express WooCommerce Plugin Styles */

#pigeon_shipping_fields {
    margin-top: 20px;
}

/* Logo header */
.pigeon-header {
    margin-bottom: 14px;
}

.pigeon-logo {
    height: 38px;
    width: auto;
    display: block;
}

/* Delivery type tab buttons */
.pigeon-shipping-to-label {
    display: block;
    margin-bottom: 6px;
}

.pigeon-shipping-to-label .pigeon-required-mark {
    color: #cc1818;
    text-decoration: none;
    border: none;
}

.pigeon-delivery-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pigeon-tab {
    flex: 1 1 0;
    min-width: 96px;
    box-sizing: border-box;
    padding: 10px 8px;
    background: #f5f7fa;
    border: 1.5px solid #d7dce5;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    color: #00327D;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

.pigeon-tab:hover {
    border-color: #FF8C12;
    background: #fff4e8;
}

.pigeon-type-icon {
    color: inherit;
    line-height: 0;
}

.pigeon-type-icon .pigeon-type-svg {
    display: block;
}

.pigeon-type-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.pigeon-tab.is-active {
    background: #F47920;
    border-color: #F47920;
    color: #fff;
    box-shadow: 0 2px 6px rgba(244, 121, 32, .35);
}

/* Autocomplete dropdown */
.pigeon-dropdown {
    position: absolute;
    z-index: 99999;
    background: #fff;
    border: 1px solid #ccc;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 280px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    border-radius: 0 0 4px 4px;
}

.pigeon-dropdown li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
}

.pigeon-dropdown li:hover {
    background: #FEF3E8;
}

/* Price row — hidden: shipping price is already shown in the order review table */
#pigeon_price_row {
    display: none !important;
}

/* Loader */
/* Center the loader (same as Speedy, in Pigeon's orange) */
#pigeon_loader {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 100px;
  height: 100px;
  margin: -75px 0 0 -75px;
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #F47920;
  width: 100px;
  height: 100px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Admin order column buttons */
.pigeon-fast-create,
.pigeon-label-btn,
.pigeon-track-btn {
    margin: 2px !important;
    white-space: nowrap;
}

/* Admin tracking table */
.pigeon-tracking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pigeon-tracking-table th,
.pigeon-tracking-table td {
    padding: 6px 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.pigeon-tracking-table thead tr {
    background: #00327D;
    color: #fff;
}

.pigeon-tracking-table tbody tr:nth-child(even) {
    background: #f0f4fa;
}

/* Admin address panel */
#pigeon-address-panel {
    margin-top: 15px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#pigeon-address-panel h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #444;
}

#pigeon-address-panel .form-table th {
    width: 140px;
    font-weight: 500;
    padding: 4px 8px 4px 0;
    vertical-align: middle;
}

#pigeon-address-panel .form-table td {
    padding: 4px 0;
    vertical-align: middle;
}

/* Loader spinner */
@keyframes pigeon-spin {
    to { transform: rotate(360deg); }
}

.pigeon-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #F47920;
    border-radius: 50%;
    animation: pigeon-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* Hide WC address fields when Pigeon Express is selected */
.pigeon-hide-field { display: none !important; }

/* Office locator map */
.pigeon-map {
    width: 100%;
    height: 320px;
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
}

/* Price badge inside delivery type tabs */
.pigeon-tab-price {
    display: block;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.95;
}

/* ---- Saved address summary (checkout + My Account) ---- */
.pigeon-saved-address {
    position: relative;
    padding: 4px 0;
    margin: 10px 0;
    line-height: 1.7;
}

.pigeon-saved-address strong {
    color: #00327D;
}

/* Pencil edit link (same Dashicons glyph as Econt) */
a.pigeon-edit-link {
    width: 16px;
    height: 0;
    padding: 16px 0 0;
    margin: 0 0 0 8px;
    overflow: hidden;
    position: relative;
    color: #999;
    border: 0;
    float: right;
    text-decoration: none;
    box-shadow: none;
}

a.pigeon-edit-link::after {
    font-family: Dashicons;
    content: '\f464';
    position: absolute;
    top: 0;
    left: 0;
    text-align: center;
    line-height: 16px;
    font-size: 16px;
    font-weight: 400;
}

a.pigeon-edit-link:hover {
    color: #FF8C12;
}

/* ---- My Account edit form ---- */
.pigeon-account-form {
    max-width: 480px;
    padding: 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 10px;
}

.pigeon-account-form .form-row {
    margin: 0 0 14px;
}

.pigeon-account-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.pigeon-account-form input[type="text"],
.pigeon-account-form select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
}

.pigeon-account-form input[type="text"]:focus,
.pigeon-account-form select:focus {
    border-color: #FF8C12;
    outline: none;
    box-shadow: 0 0 0 1px #FF8C12;
}

.pigeon-account-form #pigeon-acc-save {
    background: #FF8C12;
    border-color: #e07a00;
    color: #fff;
    font-weight: 600;
}

.pigeon-account-form #pigeon-acc-save:hover {
    background: #e07a00;
}

#pigeon-acc-city-list li:hover {
    background: #fff4e8;
    color: #FF8C12;
}

/* Saved address block at checkout is fully clickable (like Econt) */
#pigeon_saved_summary {
    cursor: pointer;
}

/* ---- Delivery type: native radio-button style (like Econt / Speedy) ---- */
.pigeon-delivery-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-bottom: 16px;
}
.pigeon-delivery-radios .pigeon-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    /* font-size / weight inherit from the theme, like Econt / Speedy */
}
.pigeon-delivery-radios .pigeon-radio-input {
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
}
.pigeon-delivery-radios .pigeon-tab-price {
    display: inline;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.95;
}

.pigeon-delivery-radios .pigeon-shipping-to-inline {
    margin-right: 4px;
    white-space: nowrap;
}

/* ============================================================
   My Account → Addresses: card styling to match the Econt block.
   Scoped to .pigeon-account-address so the checkout saved-address
   summary (which reuses .pigeon-saved-address) is untouched.
   ============================================================ */
.pigeon-account-address {
    position: relative;
    background: #fff;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    padding: 18px 20px 16px;
    margin: 10px 0 26px;
    box-shadow: 0 1px 3px rgba(0, 50, 125, .06);
    max-width: 640px;
    line-height: 1.55;
}
.pigeon-account-address:hover { border-color: #c3d0e6; }

/* Header: logo + title with a divider, matching the Econt card head. */
.pigeon-account-address > h3 {
    margin: 0 0 12px;
    padding: 0 42px 12px 0;
    border-bottom: 1px solid #eef1f6;
    font-size: 16px;
    font-weight: 700;
    color: #00327D;
    line-height: 1.3;
}

/* Saved-address body inside the card. */
.pigeon-account-address .pigeon-saved-address {
    position: static;
    padding: 0;
    margin: 0;
    color: #333;
    line-height: 1.55;
}
.pigeon-account-address .pigeon-saved-address strong {
    color: #00327D;
    font-weight: 600;
    margin-right: 6px;
}

/* Pencil edit button docked to the card's top-right (like Econt). */
.pigeon-account-address a.pigeon-edit-link {
    position: absolute;
    top: 16px;
    right: 18px;
    left: auto;
    float: none;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    overflow: visible;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2f9;
    color: #00327D;
    font-size: 0;                 /* hide the "Edit" text, keep the icon */
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    transition: background .15s ease, color .15s ease;
}
/* Same SVG-mask pencil glyph as the Econt card (crisp, recolours on hover),
   replacing the Dashicons font glyph so the two pencils are identical. */
.pigeon-account-address a.pigeon-edit-link::after {
    content: "";
    display: block;
    position: static;
    top: auto;
    left: auto;
    width: 16px;
    height: 16px;
    font: inherit;
    background-color: #00327D;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M3%2017.25V21h3.75L17.81%209.94l-3.75-3.75L3%2017.25zM20.71%207.04a1%201%200%200%200%200-1.41l-2.34-2.34a1%201%200%200%200-1.41%200l-1.83%201.83%203.75%203.75%201.83-1.83z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M3%2017.25V21h3.75L17.81%209.94l-3.75-3.75L3%2017.25zM20.71%207.04a1%201%200%200%200%200-1.41l-2.34-2.34a1%201%200%200%200-1.41%200l-1.83%201.83%203.75%203.75%201.83-1.83z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.pigeon-account-address a.pigeon-edit-link:hover {
    background: #00327D;
    color: #fff;
}
.pigeon-account-address a.pigeon-edit-link:hover::after { background-color: #fff; }

/* Edit form sits flush inside the card (drop its own nested box). */
.pigeon-account-address .pigeon-account-form {
    max-width: none;
    border: 0;
    padding: 0;
    margin: 12px 0 0;
    background: transparent;
}

/* Let a single-finger vertical swipe over the office-locator map scroll the page
   instead of being captured by OpenLayers (which sets touch-action:none). */
.pigeon-map,
.pigeon-map .ol-viewport {
    touch-action: pan-y !important;
}
/* "Find nearest office / APS" (geolocation) button + results — Pigeon orange (#F47920). */
.pigeon-nearest-row { display: block; margin-bottom: 12px; }
button.pigeon-find-nearest,
.pigeon-find-nearest {
	display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 9px 16px;
	background: #F47920; border: 1px solid #F47920; border-radius: 6px; color: #fff;
	font-weight: 600; line-height: 1.2; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08);
	transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
button.pigeon-find-nearest:hover,
.pigeon-find-nearest:hover { background: #d9660f; border-color: #d9660f; color: #fff; box-shadow: 0 2px 6px rgba(244,121,32,.35); }
button.pigeon-find-nearest:disabled,
.pigeon-find-nearest[disabled] { opacity: .6; cursor: default; box-shadow: none; }
.pigeon-find-nearest::before { content: "\1F4CD"; font-size: 1.05em; line-height: 1; }
.pigeon-nearest-msg { display: block; margin-top: 6px; font-size: 12px; color: #b00; }
.pigeon-nearest-list { margin-top: 8px; }
@media (max-width: 480px) { button.pigeon-find-nearest, .pigeon-find-nearest { width: 100%; justify-content: center; } }
