/* assets/css/style.css */

:root {
    --primary-color: #1a73e8;
    /* Google Blue */
    --hover-color: #1557b0;
    --bg-color: #f0f2f5;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --hover-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    --transition-speed: 0.3s;
    --glass-bg: rgba(255, 255, 255, 0.95);
}

body {
    background-color: var(--bg-color);
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #202124;
    min-height: 100vh;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.3s ease-in-out;
}

/* Toast Notification */
#global-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-size: 14px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#global-toast.show {
    display: block;
    opacity: 1;
}

/* Navbar */
.navbar-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.brand-gradient {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 22px;
}

/* Google-like Inputs */
.form-control,
.form-select {
    border: 1px solid #dadce0;
    border-radius: 4px;
    /* Slightly rounded, not round */
    padding: 10px 12px;
    font-size: 14px;
    box-shadow: none !important;
    /* Kill Bootstrap Glow */
    transition: border 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    border-width: 1px;
    outline: none;
    box-shadow: 0 0 0 1px var(--primary-color) !important;
}

/* Cards */
.card-premium,
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    background: #fff;
    transition: box-shadow var(--transition-speed);
}

.card-premium:hover {
    box-shadow: var(--hover-shadow);
}

/* Buttons */
.btn-primary-gradient,
.btn-primary {
    background-color: var(--primary-color);
    border: none;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    padding: 8px 24px;
    border-radius: 4px;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary-gradient:hover,
.btn-primary:hover {
    background-color: var(--hover-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Transitions (Swipe Effect) */
.form-section {
    display: none;
    /* Hidden by default */
    animation-duration: 0.4s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
    /* iOS ease */
}

.form-section.active {
    display: block;
}

.slide-in-right {
    animation-name: slideInRight;
}

.slide-out-left {
    animation-name: slideOutLeft;
}

.slide-in-left {
    animation-name: slideInLeft;
}

.slide-out-right {
    animation-name: slideOutRight;
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-50px);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(50px);
        opacity: 0;
    }
}

/* Floating Action Button for Offline Sync Status */
.sync-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sync-fab.online {
    color: #10b981;
}

.sync-fab.offline {
    color: #ef4444;
}

.sync-fab.syncing {
    color: #f59e0b;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.signature-pad {
    border: 1px solid #dadce0;
    border-radius: 4px;
    width: 100%;
    height: 200px;
    cursor: crosshair;
}

/* Fix images overflow */
img {
    max-width: 100%;
}

/* Force Bootstrap Spinner Animation */
.spinner-border {
    animation: spin 1s linear infinite !important;
}