/* TransportPro WordPress Plugin Styles */

.transportpro-calculator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.transportpro-title {
    color: #1e40af;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: bold;
}

.transportpro-form {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.transportpro-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.transportpro-form-group {
    display: flex;
    flex-direction: column;
}

.transportpro-label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #374151;
}

.transportpro-input,
.transportpro-select {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.transportpro-input:focus,
.transportpro-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.transportpro-autocomplete {
    position: relative;
}

.transportpro-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.transportpro-suggestion {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.transportpro-suggestion:hover {
    background-color: #f3f4f6;
}

.transportpro-waypoints {
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    background: #f9fafb;
}

.transportpro-waypoint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.transportpro-waypoint-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.transportpro-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.transportpro-button:hover {
    background: #2563eb;
}

.transportpro-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.transportpro-button-secondary {
    background: #6b7280;
    color: white;
}

.transportpro-button-secondary:hover {
    background: #4b5563;
}

.transportpro-results {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.transportpro-results-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 20px;
    text-align: center;
}

.transportpro-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.transportpro-summary-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.transportpro-summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e40af;
}

.transportpro-summary-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 5px;
}

.transportpro-cost-breakdown {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.transportpro-cost-breakdown h3 {
    margin-bottom: 15px;
    color: #374151;
}

.transportpro-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.transportpro-cost-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: #1e40af;
}

.transportpro-cost-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.transportpro-cost-checkbox {
    margin-right: 5px;
}

.transportpro-cost-value {
    font-weight: 600;
}

.transportpro-map {
    margin-top: 20px;
    height: 400px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.transportpro-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.transportpro-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.transportpro-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
}

.transportpro-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
}

/* Admin Styles */
.transportpro-admin {
    margin: 20px 0;
}

.transportpro-admin-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.transportpro-admin-logo {
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.transportpro-admin-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #374151;
    margin: 0;
}

.transportpro-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.transportpro-card h3 {
    margin-top: 0;
    color: #374151;
}

.transportpro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.transportpro-stat {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.transportpro-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
}

.transportpro-stat-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 5px;
}

.transportpro-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.transportpro-table th,
.transportpro-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.transportpro-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.transportpro-table tr:hover {
    background: #f9fafb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .transportpro-calculator {
        padding: 15px;
        margin: 10px;
    }
    
    .transportpro-form-row {
        grid-template-columns: 1fr;
    }
    
    .transportpro-summary {
        grid-template-columns: 1fr;
    }
    
    .transportpro-stats {
        grid-template-columns: 1fr;
    }
    
    .transportpro-title {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .transportpro-button,
    .transportpro-map {
        display: none;
    }
    
    .transportpro-calculator {
        box-shadow: none;
        border: 1px solid #000;
    }
}