/* Frontend Styles for Training Quotation Plugin */
:root {
    --tq-primary: #4361ee;
    --tq-secondary: #3a0ca3;
    --tq-success: #4cc9f0;
    --tq-info: #4895ef;
    --tq-warning: #f72585;
    --tq-danger: #b5179e;
    --tq-light: #f8f9fa;
    --tq-dark: #212529;
    --tq-border: #dee2e6;
    --tq-border-radius: 8px;
    --tq-box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --tq-transition: all 0.3s ease;
}

/* Form Container */
.tq-form-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border-radius: var(--tq-border-radius);
    box-shadow: var(--tq-box-shadow);
    overflow: hidden;
}

.tq-form-header {
    background: linear-gradient(135deg, var(--tq-primary), var(--tq-secondary));
    color: white;
    padding: 2rem;
    text-align: center;
}

.tq-form-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.tq-form-header .tq-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

/* Form Elements */
.tq-form {
    padding: 2rem;
}

.tq-form-group {
    margin-bottom: 1.5rem;
}

.tq-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--tq-dark);
}

.tq-form-group label i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

.tq-required {
    color: var(--tq-warning);
    margin-left: 0.25rem;
}

.tq-input,
.tq-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--tq-border);
    border-radius: var(--tq-border-radius);
    font-size: 1rem;
    transition: var(--tq-transition);
    background: white;
}

.tq-input:focus,
.tq-select:focus {
    outline: none;
    border-color: var(--tq-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.tq-help {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.tq-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tq-form-col {
    flex: 1;
}

/* Buttons */
.tq-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--tq-border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tq-transition);
    text-decoration: none;
    line-height: 1;
}

.tq-button i {
    font-size: 0.875rem;
}

.tq-button-primary {
    background: var(--tq-primary);
    color: white;
}

.tq-button-primary:hover {
    background: var(--tq-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.tq-button-secondary {
    background: #6c757d;
    color: white;
}

.tq-button-secondary:hover {
    background: #5a6268;
}

.tq-button-outline {
    background: transparent;
    border: 2px solid var(--tq-primary);
    color: var(--tq-primary);
}

.tq-button-outline:hover {
    background: var(--tq-primary);
    color: white;
}

.tq-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tq-border);
}

/* Alerts */
.tq-alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--tq-border-radius);
    border-left: 4px solid;
}

.tq-alert-success {
    background: rgba(76, 201, 240, 0.1);
    border-color: var(--tq-success);
    color: #0c5460;
}

.tq-alert-danger {
    background: rgba(247, 37, 133, 0.1);
    border-color: var(--tq-warning);
    color: #721c24;
}

.tq-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #713f12;
}

/* Distance Preview */
.tq-distance-preview {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(67, 97, 238, 0.05);
    border-radius: var(--tq-border-radius);
    color: var(--tq-primary);
    font-size: 0.875rem;
    border-left: 3px solid var(--tq-primary);
}

.tq-distance-preview i {
    margin-right: 0.5rem;
}

/* Cost Estimate */
.tq-cost-estimate {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--tq-border-radius);
    border: 1px solid var(--tq-border);
}

.tq-cost-estimate h4 {
    margin: 0 0 1rem 0;
    color: var(--tq-dark);
    font-size: 1.1rem;
}

.tq-estimate-content {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tq-primary);
}

/* Form Info */
.tq-form-info {
    background: #e8f4fd;
    border-radius: var(--tq-border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--tq-info);
}

.tq-form-info p {
    margin: 0;
    color: var(--tq-dark);
}

.tq-form-info i {
    color: var(--tq-info);
    margin-right: 0.5rem;
}

/* Course Type */
.tq-course-type {
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
    margin-left: 0.5rem;
}

/* Quotation Display */
.tq-quotation-container {
    max-width: 900px;
    margin: 2rem auto;
    background: white;
    border-radius: var(--tq-border-radius);
    box-shadow: var(--tq-box-shadow);
    overflow: hidden;
}

.tq-quotation-header {
    background: linear-gradient(135deg, var(--tq-primary), var(--tq-secondary));
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tq-quotation-title h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.tq-reference {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tq-quotation-date {
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.9;
}

.tq-quotation-body {
    padding: 2rem;
}

.tq-section {
    margin-bottom: 2rem;
}

.tq-section h3 {
    margin: 0 0 1rem 0;
    color: var(--tq-dark);
    font-size: 1.3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--tq-border);
}

.tq-section h3 i {
    color: var(--tq-primary);
    margin-right: 0.5rem;
}

.tq-section-content {
    padding: 1rem 0;
}

.tq-info-row {
    display: flex;
    margin-bottom: 0.75rem;
}

.tq-info-label {
    flex: 0 0 120px;
    font-weight: 600;
    color: var(--tq-dark);
}

.tq-info-value {
    flex: 1;
    color: #495057;
}

/* Cost Breakdown */
.tq-cost-breakdown {
    padding: 1rem 0;
}

.tq-cost-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--tq-border);
}

.tq-cost-row:last-child {
    border-bottom: none;
}

.tq-cost-label {
    color: var(--tq-dark);
}

.tq-cost-value {
    font-weight: 600;
    color: var(--tq-primary);
}

.tq-total-row {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 2px solid var(--tq-border);
    font-size: 1.2rem;
}

.tq-total-label {
    font-weight: 700;
    color: var(--tq-dark);
}

.tq-total-value {
    font-weight: 700;
    color: var(--tq-primary);
}

/* Quotation Footer */
.tq-quotation-footer {
    padding: 2rem;
    background: #f8f9fa;
    border-top: 1px solid var(--tq-border);
}

.tq-export-options {
    margin-bottom: 1.5rem;
}

.tq-export-options h4 {
    margin: 0 0 1rem 0;
    color: var(--tq-dark);
    font-size: 1.1rem;
}

.tq-export-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tq-action-buttons {
    text-align: center;
}

/* Loading States */
.tq-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.tq-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.75rem 0 0 -0.75rem;
    border: 2px solid var(--tq-border);
    border-top-color: var(--tq-primary);
    border-radius: 50%;
    animation: tq-spin 0.8s linear infinite;
}

@keyframes tq-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tq-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tq-form-col {
        margin-bottom: 1rem;
    }
    
    .tq-form-col:last-child {
        margin-bottom: 0;
    }
    
    .tq-quotation-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tq-quotation-date {
        text-align: center;
    }
    
    .tq-info-row {
        flex-direction: column;
    }
    
    .tq-info-label {
        margin-bottom: 0.25rem;
    }
    
    .tq-form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tq-form-actions .tq-button {
        width: 100%;
    }
    
    .tq-export-buttons {
        flex-direction: column;
    }
    
    .tq-export-buttons .tq-button {
        width: 100%;
    }
}

/* Animations */
.tq-fade-in {
    animation: tq-fadeIn 0.3s ease-in;
}

@keyframes tq-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}