/* ESA Calculator Styles */
.esa-calculator-container {
    max-width: 600px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.esa-calculator-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1.5rem;
}

.esa-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.esa-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.esa-input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
}

.esa-input-group input,
.esa-input-group select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.esa-input-group input:focus,
.esa-input-group select:focus {
    outline: none;
    border-color: #00b648;
    box-shadow: 0 0 0 3px rgba(0, 182, 72, 0.1);
}

.esa-calculator-btn {
    background: linear-gradient(135deg, #00b648, #009a3a);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.esa-calculator-btn:hover {
    background: linear-gradient(135deg, #009a3a, #007d2f);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 182, 72, 0.3);
}

.esa-calculator-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.esa-price-output {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.esa-price-output.esa-success {
    background: rgba(0, 182, 72, 0.1);
    border: 1px solid rgba(0, 182, 72, 0.3);
}

.esa-price-output.esa-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.esa-price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #00b648;
    margin-bottom: 1rem;
}

.esa-price-details {
    font-size: 0.9rem;
    color: #2c3e50;
}

.esa-route-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.esa-route-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.esa-route-label {
    font-weight: 600;
    color: #34495e;
}

.esa-route-value {
    color: #2c3e50;
}

.esa-estimated-price {
    font-size: 1.1rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(0, 182, 72, 0.1);
    border-radius: 8px;
    color: #009a3a;
}

.esa-calculator-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.esa-calculator-note {
    color: #7f8c8d;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Booking Form Styles */
.esa-booking-container {
    max-width: 600px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.esa-booking-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1.5rem;
}

.esa-booking-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.esa-booking-btn {
    background: linear-gradient(135deg, #00b648, #009a3a);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.esa-booking-btn:hover {
    background: linear-gradient(135deg, #009a3a, #007d2f);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 182, 72, 0.3);
}

.esa-booking-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Hero Button Styles */
.hero-button {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    line-height: 1.2;
    position: relative;
    overflow: hidden;
}

.hero-button-primary {
    background: linear-gradient(135deg, #00b648, #009a3a);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 182, 72, 0.3);
}

.hero-button-primary:hover {
    background: linear-gradient(135deg, #009a3a, #007d2f);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 182, 72, 0.4);
    color: white;
}

.hero-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 182, 72, 0.3);
}

/* Booking CTA Styles */
.esa-booking-cta {
    margin: 1.5rem 0 1rem 0;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 182, 72, 0.2);
}

.esa-book-now-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.esa-book-now-btn:hover {
    background: linear-gradient(135deg, #d35400, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .esa-calculator-container,
    .esa-booking-container {
        margin: 0;
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .esa-calculator-title,
    .esa-booking-title {
        font-size: 1.5rem;
    }
    
    .esa-price-amount {
        font-size: 2rem;
    }
    
    .esa-route-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .hero-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
    
    .esa-booking-cta {
        margin: 1rem 0 0.5rem 0;
    }
}

/* Admin Styles */
.esa-calculator-admin .esa-admin-header {
    margin-bottom: 2rem;
}

.esa-calculator-admin .esa-admin-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.esa-calculator-admin .esa-admin-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.esa-calculator-admin .esa-admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.esa-calculator-admin .esa-admin-card h2 {
    margin-top: 0;
    color: #1d2327;
}

.esa-calculator-admin .esa-admin-card h3 {
    margin-top: 0;
    color: #1d2327;
    border-bottom: 1px solid #ccd0d4;
    padding-bottom: 0.5rem;
}

.esa-calculator-admin .esa-admin-card code {
    background: #f6f7f7;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
    display: inline-block;
    margin: 2px 0;
}

.esa-calculator-admin .esa-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.esa-calculator-admin .esa-status-success {
    background: rgba(0, 182, 72, 0.1);
    color: #009a3a;
}

.esa-calculator-admin .esa-status-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.esa-api-key-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esa-api-key-field {
    flex: 1;
}

.esa-price-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esa-currency-symbol {
    font-weight: 600;
    color: #2c3e50;
}

.esa-price-input {
    width: 80px !important;
}

.esa-price-description {
    color: #666;
    font-size: 0.9em;
}

/* Добавьте эти стили в конец calculator.css */

.esa-price-output.esa-loading {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: #3498db;
}

.esa-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.esa-error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 10px;
}

.esa-error-icon {
    font-size: 1.2em;
}

.esa-booking-cta {
    margin: 1.5rem 0 1rem 0;
    text-align: center;
}

.esa-book-now-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.esa-book-now-btn:hover {
    background: linear-gradient(135deg, #d35400, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

/* Autocomplete dropdown styles */
.pac-container {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
}

.pac-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.pac-item:hover {
    background-color: #f8f9fa;
}

.pac-item-selected {
    background-color: rgba(0, 182, 72, 0.1);
}

.pac-matched {
    font-weight: 600;
    color: #00b648;
}

/* Responsive improvements */
@media (max-width: 480px) {
    .esa-route-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .esa-book-now-btn {
        width: 100%;
        padding: 15px;
    }
    
    .hero-button {
        width: 100%;
    }
}

/* Focus styles for better accessibility */
.esa-input-group input:focus,
.esa-input-group select:focus {
    outline: none;
    border-color: #00b648;
    box-shadow: 0 0 0 3px rgba(0, 182, 72, 0.1);
}

/* Loading animation */
@keyframes esa-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.esa-loading {
    animation: esa-pulse 1.5s ease-in-out infinite;
}

/* file: esa-google-map-calculator/assets/css/calculator.css */
/* Добавить в конец файла */

/* Stops Management Styles */
.esa-stops-container {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #00b648;
}

.esa-stops-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.esa-stops-header label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
}

.esa-add-stop-btn {
    background: #00b648;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.esa-add-stop-btn:hover {
    background: #009a3a;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 182, 72, 0.2);
}

.esa-stop-item {
    display: flex;
    gap: 10px;
    margin-bottom: 0.75rem;
    align-items: center;
    animation: esa-slideIn 0.3s ease;
}

.esa-stop-item:last-child {
    margin-bottom: 0;
}

.esa-stop-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.esa-stop-input:focus {
    outline: none;
    border-color: #00b648;
    box-shadow: 0 0 0 3px rgba(0, 182, 72, 0.1);
}

.esa-remove-stop-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esa-remove-stop-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.2);
}

.esa-remove-stop-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.esa-stops-summary {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 182, 72, 0.05);
    border-radius: 8px;
    border-left: 3px solid #00b648;
}

.esa-stops-summary h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 600;
}

.esa-stops-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.esa-stops-list li {
    padding: 0.25rem 0;
    color: #34495e;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.esa-stops-list li::before {
    content: "•";
    color: #00b648;
    font-weight: bold;
    font-size: 1.2rem;
}

@keyframes esa-slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.esa-waypoint-badge {
    display: inline-block;
    background: #00b648;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 480px) {
    .esa-stops-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .esa-add-stop-btn {
        width: 100%;
        justify-content: center;
    }
    
    .esa-stop-item {
        flex-direction: column;
    }
    
    .esa-remove-stop-btn {
        width: 100%;
        height: 40px;
    }
}