/* Gaya Dasar untuk Kalkulator Tarif Parkir */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

#version-info {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Main content */
main {
    flex: 1;
}

/* Form styling */
.input-section {
    margin-bottom: 30px;
}

.input-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Result section */
.result-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #27ae60;
}

.result-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #27ae60;
}

.result-summary {
    margin-bottom: 25px;
}

.result-summary h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.summary-item.total {
    font-weight: bold;
    font-size: 1.2em;
    color: #27ae60;
    border-top: 2px solid #27ae60;
    margin-top: 10px;
}

.cost-breakdown h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#breakdown-details {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* Error section */
.error-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffebee;
    border-radius: 5px;
    border-left: 4px solid #e74c3c;
}

.error-message {
    color: #c62828;
    font-weight: bold;
}

/* Loading section */
.loading-section {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
}

/* Footer */
footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9em;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Tombol secondary untuk tombol tambahan */
.secondary-btn {
    background-color: #95a5a6;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
}

.secondary-btn:hover {
    background-color: #7f8c8d;
}

/* Modal untuk aturan tarif */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Gaya untuk tampilan aturan */
#rules-display {
    font-size: 14px;
}

#rules-display .rules-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 5px;
}

#rules-display ul {
    margin: 10px 0;
    padding-left: 20px;
}

#rules-display li {
    margin-bottom: 5px;
}

#rules-display hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

#rules-display .location-rules {
    margin-bottom: 20px;
}

#rules-display .location-rules h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #3498db;
}

#rules-display .category-rule {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #3498db;
}

#rules-display .category-rule h4 {
    margin-top: 0;
    color: #27ae60;
    margin-bottom: 10px;
}

/* Responsif untuk modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .close {
        align-self: flex-end;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    #rules-display {
        font-size: 13px;
    }
}