/* ========================================
   RUDDHAACONNECT - GLOBAL STYLES
   Base styling for all pages
   ======================================== */

@import url('variables.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
}

body {
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--heading-color);
}

h1 { font-size: 28px; margin-bottom: var(--spacing-lg); }
h2 { font-size: var(--font-size-heading); margin-bottom: var(--spacing-md); }
h3 { font-size: var(--font-size-lg); margin-bottom: var(--spacing-md); }
h4, h5, h6 { font-size: var(--font-size-base); margin-bottom: var(--spacing-sm); }

p { margin-bottom: var(--spacing-md); }

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #1557d1;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Form Elements */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

input, select, textarea {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

input:disabled, select:disabled, textarea:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-weight: 700;
    transition: all var(--transition-fast);
}

button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Lists */
ul, ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

li {
    margin-bottom: var(--spacing-sm);
}

/* Code */
code, pre {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
}

code {
    display: inline-block;
}

pre {
    display: block;
    overflow-x: auto;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: left;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

th {
    background: #f8f8f8;
    font-weight: 700;
}

/* Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}
