/*
 * File: style.css
 * Date: May 2, 2026
 * Description: Stylesheet for the Edmonton Property Assessment app.
*/

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 28px;
    width: 100%;
    max-width: 750px;
}

h1 {
    text-align: center;
    margin: 0 0 4px 0;
    color: #2c3e50;
    font-size: 26px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 28px;
    font-size: 13px;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

input,
button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
}

input {
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
    background: white;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: #2c3e50;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover {
    background: #1a252f;
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-item:hover {
    background: #f0f2f5;
}

.autocomplete-item strong {
    color: #2c3e50;
}

.years-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.years-section label.section-label {
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
    display: block;
}

.years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, auto));
    gap: 10px;
    margin-top: 10px;
}

.year-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.year-checkbox input {
    width: auto;
    margin: 0;
}

.year-checkbox label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.select-all {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.select-all button {
    width: auto;
    padding: 6px 14px;
    font-size: 12px;
    background: #95a5a6;
}

.select-all button:first-child {
    background: #2c3e50;
}

h3 {
    text-align: center;
    margin: 20px 0 10px;
    color: #34495e;
}

.property-summary {
    background: #f0f4f8;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid #d1d9e6;
}

.summary-item {
    font-size: 14px;
    color: #2c3e50;
}

.summary-item strong {
    color: #667eea;
}

.table-container {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    display: none;
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: #2c3e50;
    color: white;
    padding: 12px;
    text-align: left;
}

td {
    border: 1px solid #ddd;
    padding: 12px;
}

.year-col {
    background: #f8f9fa;
    font-weight: bold;
    text-align: center;
    width: 80px;
}

.val {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

.tax {
    font-size: 13px;
    color: #e67e22;
    margin-top: 6px;
}

.trend {
    font-size: 12px;
    margin-left: 8px;
    font-weight: normal;
}

.positive {
    color: #27ae60;
}

.negative {
    color: #e74c3c;
}

.note {
    font-size: 12px;
    color: #555;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
    border-left: 4px solid #667eea;
}

#error-msg {
    color: #e74c3c;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #fee;
    border-radius: 8px;
    display: none;
}

#loading {
    text-align: center;
    color: #667eea;
    display: none;
    margin-top: 20px;
    font-weight: 500;
}

#back-btn {
    background: #95a5a6;
    margin-top: 20px;
    display: none;
}

#back-btn:hover {
    background: #7f8c8d;
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.auto-hint {
    font-size: 12px;
    color: #667eea;
    margin-top: 5px;
    padding-left: 4px;
}

/* Prevent password manager interference */
input::-webkit-credentials-auto-fill-button,
input::-webkit-contacts-auto-fill-button,
input::-webkit-credit-card-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}
