/**
 * Parking Checker Plugin Styles
 * Version: 1.3.0 - Minimal Neutral Theme
 */

/* Main container - Simple and clean */
.parking-checker {
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    font-family: inherit; /* Inherit from theme */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form styling - Direct, no extra containers */
.parking-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: inherit; /* Inherit from theme */
    font-size: 0.95em;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: inherit; /* Inherit from theme */
    font-family: inherit; /* Inherit from theme */
}

.form-group input[type="text"]:hover {
    border-color: #b0b0b0;
}

.form-group input[type="text"]:focus {
    border-color: #005ece;
    box-shadow: 0 0 0 1px #005ece;
}

.check-btn {
    width: 100%;
    padding: 14px 20px;
    background: #005ece; /* Neutral gray - will be overridden by custom CSS */
    color: white;
    border: 2px solid #005ece;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    font-family: inherit; /* Inherit from theme */
}

.check-btn:hover {
    background: #ededed;
    border-color: #ededed;
    color: #005ece;
}

.check-btn:active {
    transform: translateY(1px);
}

.check-btn:disabled {
    background: #cccccc;
    border-color: #cccccc;
    color: #005ece;
    cursor: not-allowed;
    transform: none;
}

/* Results styling - No extra containers or shadows */
.parking-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    border: 1px solid #e8e8e8;
    border-left: 4px solid #cccccc; /* Default neutral - will be overridden */
}

.parking-results.success {
    border-left: 4px solid #28a745; /* Green - will be overridden by custom CSS */
    background: #f8fff8;
}

.parking-results.warning {
    border-left: 4px solid #ffc107; /* Orange - will be overridden by custom CSS */
    background: #fffef8;
}

.parking-results.danger,
.parking-results.error {
    border-left: 4px solid #dc3545; /* Red - will be overridden by custom CSS */
    background: #fff8f8;
}

.parking-results.info {
    border-left: 4px solid #17a2b8; /* Blue - will be overridden by custom CSS */
    background: #f8fcff;
}

.result-header {
    text-align: center;
}

.result-header h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: inherit; /* Inherit from theme */
}

.result-header .main-message {
    font-size: 1.1em;
    line-height: 1.5;
    color: inherit; /* Inherit from theme */
    font-weight: 500;
    margin: 0;
}

.result-header .area-name {
    font-size: 0.9em;
    color: #666666;
    margin-top: 8px;
    font-style: italic;
}

/* Loading animation - Simple and clean */
.parking-loading {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    margin-top: 20px;
}

.loading-spinner {
    border: 3px solid #f0f0f0;
    border-top-color: #005ece;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.parking-loading p {
    color: #666666;
    font-size: 0.95em;
    margin: 0;
    font-weight: 500;
}

/* Error styling - Simple and consistent */
.parking-error-container {
    max-width: 500px;
    margin: 0 auto;
}

.parking-error-container .parking-error {
    background: #fff8f8;
    color: #721c24;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

.parking-error-container .parking-error h3 {
    margin: 0 0 12px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.parking-error-container .admin-help {
    background: #f8fcff;
    color: #0c5460;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 3px solid #17a2b8;
    border: 1px solid #bee5eb;
}

.parking-error-container .admin-help ul {
    margin: 10px 0 0 20px;
}

.parking-error-container .admin-help code {
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.875em;
    border: 1px solid #bee5eb;
}

/* Responsive design */
@media (max-width: 600px) {
    .parking-checker {
        margin: 15px;
        padding: 15px;
    }

    .parking-results,
    .parking-loading {
        padding: 15px;
    }

    .form-group input[type="text"],
    .check-btn {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
    }
}

@media (max-width: 400px) {
    .parking-checker {
        margin: 10px;
        padding: 12px;
    }

    .result-header h3 {
        font-size: 1.2em;
    }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    .parking-checker {
        border: 2px solid #000000;
    }

    .form-group input[type="text"] {
        border: 2px solid #000000;
    }

    .check-btn {
        border: 2px solid #000000;
    }

    .parking-results {
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }

    .check-btn:active {
        transform: none;
    }

    * {
        transition: none !important;
    }
}

/* Print styles */
@media print {
    .parking-checker {
        box-shadow: none;
        border: 1px solid #000000;
        background: #ffffff !important;
    }

    .check-btn,
    .parking-loading {
        display: none;
    }

    .parking-results {
        background: #ffffff !important;
        color: #000000 !important;
    }
}
