/**
 * PartFinder App CSS
 * Custom styles for the application
 * Version: 1.0.0
 */

:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #E3F2FD;
    --accent-color: #FF5722;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    --gray-light: #F5F5F5;
    --gray-medium: #9E9E9E;
    --gray-dark: #424242;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: #f9f9f9;
}

/* =====================================================
   LOGIN PAGE STYLES
   ===================================================== */

.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.app-logo {
    margin: 40px 0 20px 0;
}

.logo {
    width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-container h2 {
    color: var(--gray-dark);
    margin: 20px 0 10px 0;
    font-size: 24px;
}

.subtitle {
    color: var(--gray-medium);
    font-size: 14px;
    margin-bottom: 30px;
}

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

.form-group ons-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    box-sizing: border-box;
}

.login-btn {
    width: 100%;
    margin: 25px 0 15px 0;
    border: none;
    background: none;
    padding: 0;
    outline: none;
}

.login-btn ons-button {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    border: none;
}

.login-links {
    margin-top: 20px;
    font-size: 13px;
}

.login-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0 5px;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-links .separator {
    color: #ddd;
    margin: 0 5px;
}

/* =====================================================
   DASHBOARD STYLES
   ===================================================== */

.dashboard-container {
    padding: 20px;
}

.dashboard-container p {
    color: var(--gray-dark);
    font-size: 18px;
    margin: 0;
}

.welcome-section {
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
}

.welcome-section p {
    color: var(--gray-medium);
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.dashboard-card ons-icon {
    font-size: 32px;
    color: var(--primary-color);
}

.dashboard-card span {
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-dark);
}

/* =====================================================
   FORM CONTAINER
   ===================================================== */

.form-container {
    padding: 20px;
    max-width: 500px;
}

.form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Buttons in reset/password forms should match login button (no outline/border) */
.form-container button {
    border: none;
    outline: none;
    padding: 0;
    background: none;
    width: 100%;
}

.form-container button:focus,
.form-container button:active,
.form-container ons-button:focus,
.form-container ons-button:active {
    outline: none !important;
    box-shadow: none !important;
}

.form-container ons-input,
.form-container ons-select {
    width: 100%;
}

/* =====================================================
   PROFILE STYLES
   ===================================================== */

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 10px;
}

.profile-section-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-dark);
}

.profile-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.profile-table td:first-child {
    color: var(--gray-medium);
    width: 40%;
}

.profile-table td:last-child {
    color: var(--gray-dark);
    font-weight: 500;
    text-align: right;
}

.profile-table tr:last-child td {
    border-bottom: none;
}

.last-payment-box {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.last-payment-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--primary-color);
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--gray-medium);
    margin-bottom: 5px;
}

.textarea {
    font-family: inherit;
    font-size: 14px;
    background-color: white !important;
}

.select-input {
    background-color: white !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    height: auto !important;
}

/* =====================================================
   LOADING INDICATOR
   ===================================================== */

#loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.placeholder {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.placeholder p {
    color: var(--gray-dark);
    font-size: 16px;
    margin: 0;
}

/* =====================================================
   TOOLBAR STYLING
   ===================================================== */

ons-toolbar {
    background-color: var(--primary-color);
    color: white;
}

ons-toolbar-button {
    color: white;
}

ons-toolbar-button:hover {
    opacity: 0.8;
}

/* =====================================================
   BUTTON STYLING
   ===================================================== */

ons-button {
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

ons-button[modifier="large"] {
    padding: 12px 20px;
    font-size: 14px;
}

/* =====================================================
   PAGE CONTENT
   ===================================================== */

.page__content {
    background-color: var(--gray-light);
    padding: 0;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .logo {
        width: 180px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .notification {
        margin: 5px;
        padding: 0 12px;
        font-size: 12px;
    }
}

/* =====================================================
   DARK MODE SUPPORT
   ===================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --gray-light: #212121;
        --gray-dark: #e0e0e0;
        --gray-medium: #bdbdbd;
    }
    
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .login-container,
    .form-container,
    .profile-container {
        background-color: #1e1e1e;
    }
    
    .profile-section {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }
    
    .profile-item {
        border-bottom-color: #333;
    }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

/* =====================================================
   PASSWORD RESET STYLES
   ===================================================== */

.reset-step {
    padding: 20px 0;
}

.reset-step h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.reset-info {
    color: var(--gray-medium);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.form-container {
    padding: 20px;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    #notifications-container,
    #loading {
        display: none;
    }
}