/**
 * TLS Transit Time - Public Styles
 *
 * @package TLSTransitTime
 */

/* Main Container */
.tlstt-transit-time-form {
    max-width: 800px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

/* Form Layout */
.tlstt-form {
    margin-bottom: 20px;
}

.tlstt-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.tlstt-form-field {
    flex: 1;
    min-width: 200px;
}

/* Form Elements */
.tlstt-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.tlstt-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
}

.tlstt-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.tlstt-button {
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.tlstt-button:hover {
    background-color: #135e96;
}

.tlstt-button:focus {
    outline: none;
    box-shadow: 0 0 0 1px white, 0 0 0 3px #2271b1;
}

/* Loading State */
.tlstt-loading {
    display: none;
    margin: 20px 0;
    text-align: center;
}

.tlstt-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #2271b1;
    animation: tlstt-spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.tlstt-loading-text {
    display: inline-block;
    vertical-align: middle;
}

/* Results Container */
.tlstt-results {
    margin: 20px 0;
}

.tlstt-result-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
}

.tlstt-result-header {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.tlstt-result-header h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.tlstt-result-body {
    padding: 15px;
}

.tlstt-result-row {
    display: flex;
    margin-bottom: 10px;
}

.tlstt-result-row:last-child {
    margin-bottom: 0;
}

.tlstt-result-label {
    font-weight: 600;
    min-width: 120px;
}

.tlstt-transit-days {
    font-size: 18px;
    color: #2271b1;
}

/* Error Messages */
.tlstt-error {
    display: none;
    margin: 20px 0;
    padding: 10px 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Accessibility Improvements */
.tlstt-input:focus,
.tlstt-button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .tlstt-form-row {
        flex-direction: column;
    }
    
    .tlstt-form-field {
        width: 100%;
    }
    
    .tlstt-result-row {
        flex-direction: column;
    }
    
    .tlstt-result-label {
        margin-bottom: 5px;
    }
}