/* Estilos para el detector de ubicación */
.pa-location-selector-wrapper {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pa-location-selector {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Tarjeta de ubicación actual */
.pa-current-location-card {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
}

.pa-current-location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pa-current-location-header h4 {
    margin: 0;
    color: #2C3E50;
    font-size: 1.3em;
}

.pa-btn-clear-location {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
}

.pa-btn-clear-location:hover {
    background: #c0392b;
}

.pa-current-location-info {
    text-align: center;
}

.pa-current-address {
    font-size: 1.1em;
    font-weight: bold;
    color: #2C3E50;
    margin: 0 0 8px 0;
}

.pa-current-zone {
    color: #666;
    font-style: italic;
    margin: 0 0 15px 0;
}

.pa-current-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pa-btn-use-current {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.pa-btn-use-current:hover {
    background: #219653;
}

.pa-btn-change-location {
    background: transparent;
    color: #E67E22;
    border: 2px solid #E67E22;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.pa-btn-change-location:hover {
    background: #E67E22;
    color: white;
}

/* Formulario de ubicación */
.pa-location-form {
    padding: 30px;
}

.pa-location-header {
    text-align: center;
    margin-bottom: 25px;
}

.pa-location-header h3 {
    margin: 0 0 10px 0;
    color: #2C3E50;
    font-size: 1.5em;
}

.pa-location-header p {
    margin: 0;
    color: #666;
    font-size: 1em;
}

.pa-address-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.pa-address-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.pa-address-input:focus {
    outline: none;
    border-color: #E67E22;
}

.pa-detect-location-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pa-detect-location-btn:hover {
    background: #e9ecef;
    border-color: #E67E22;
}

.pa-location-actions {
    text-align: center;
}

.pa-validate-btn {
    background: #E67E22;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.pa-validate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pa-validate-btn:not(:disabled):hover {
    background: #D35400;
}

/* Resultados */
.pa-location-results {
    padding: 25px;
}

.pa-coverage-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
}

.pa-status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.pa-status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pa-status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pa-available-businesses {
    margin-top: 20px;
}

.pa-available-businesses h4 {
    color: #2C3E50;
    margin-bottom: 15px;
    text-align: center;
}

.pa-businesses-list {
    display: grid;
    gap: 15px;
}

.pa-business-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
}

.pa-business-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pa-business-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.pa-business-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pa-no-image {
    width: 100%;
    height: 100%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
}

.pa-business-info {
    flex: 1;
}

.pa-business-info h5 {
    margin: 0 0 8px 0;
    color: #2C3E50;
    font-size: 1.1em;
}

.pa-business-description {
    color: #666;
    margin: 0 0 10px 0;
    font-size: 0.9em;
}

.pa-business-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.85em;
}

.pa-business-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #555;
}

.pa-business-actions {
    text-align: right;
}

.pa-view-menu-btn {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.pa-view-menu-btn:hover {
    background: #2980b9;
    color: white;
}

/* Acciones de éxito */
.pa-location-success-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.pa-btn-continue {
    flex: 2;
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pa-btn-continue:hover {
    background: #219653;
}

.pa-btn-change {
    flex: 1;
    background: transparent;
    color: #E67E22;
    border: 2px solid #E67E22;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pa-btn-change:hover {
    background: #E67E22;
    color: white;
}

/* Loading */
.pa-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.pa-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E67E22;
    border-radius: 50%;
    animation: pa-spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .pa-location-selector-wrapper {
        margin: 10px;
    }
    
    .pa-current-location-card,
    .pa-location-form {
        padding: 20px;
    }
    
    .pa-address-input-group {
        flex-direction: column;
    }
    
    .pa-current-actions {
        flex-direction: column;
    }
    
    .pa-location-success-actions {
        flex-direction: column;
    }
    
    .pa-business-card {
        flex-direction: column;
        text-align: center;
    }
    
    .pa-business-stats {
        justify-content: center;
    }
}

/* Estilos para el autocomplete de Google */
.pac-container {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 5px;
    border: 2px solid #E67E22;
    font-family: inherit;
}

.pac-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    font-family: inherit;
}

.pac-item:hover {
    background: #f8f9fa;
}

.pac-item-query {
    color: #2C3E50;
    font-family: inherit;
}

.pac-matched {
    color: #E67E22;
    font-weight: bold;
}