/* client-styles.css */

/* Root Variables */
:root {
    --primary-dark: #212529;
    --secondary-dark: #495057;
    --light-gray: #f8f9fa;
    --border-gray: #dee2e6;
    --text-dark: #212529;
    --text-muted: #6c757d;
}

/* General Layout */
body {
    background-color: #ffffff;
    color: var(--text-dark);
}

.navbar {
    background-color: var(--primary-dark) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn-custom-primary {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-custom-primary:hover {
    background-color: #424649;
    border-color: #373b3e;
    color: #fff;
}

.btn-custom-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-custom-secondary:hover {
    background-color: #7d8388;
    border-color: #6c757d;
    color: #fff;
}

.btn-custom-info {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: #fff;
}

.btn-custom-info:hover {
    background-color: #5c636a;
    border-color: var(--secondary-dark);
    color: #fff;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    white-space: nowrap;
    font-size: 0.9em;
    background-color: var(--light-gray);
    border-bottom: 2px solid var(--border-gray);
    color: var(--text-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    font-size: 0.9em;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-gray);
}

.custody-percent {
    width: 85px !important;
    display: inline-block !important;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    padding: 0.25rem;
    background-color: white;
}

.custody-percent input {
    width: 60px;
    border: none;
    text-align: right;
    padding: 0 4px;
    background: transparent;
}

.custody-percent input:focus {
    outline: none;
}

.custody-percent span {
    font-size: 0.9em;
    color: var(--text-dark);
}

/* Month Selector */
.month-selector {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

/* Loading */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    text-align: center;
    color: white;
    padding-top: 20%;
}

.loading .progress {
    width: 200px;
    height: 4px !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    margin: 0 auto;
    border-radius: 2px;
}

.loading .progress-bar {
    background-color: white !important;
    transition: width 0.3s ease;
}

/* Calculate Button Section */
.calculate-button {
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--border-gray);
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.05);
}

/* Totals Section */
.total-info {
    background-color: var(--light-gray);
    border-top: 1px solid var(--border-gray);
    padding: 1rem;
    margin-top: 1rem;
}

.total-row {
    background-color: var(--light-gray);
    font-weight: 500;
}

.total-custody {
    color: var(--primary-dark);
    font-weight: bold;
}

/* Animations */
@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: rgba(40, 167, 69, 0.2); }
    100% { background-color: transparent; }
}

.highlight-animation {
    animation: highlight 1s ease-in-out;
}

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

.spin {
    animation: spin 1s linear infinite;
}

/* Utility Classes */
.text-end {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}