/* CME Registration Portal - Main Styles */
/* Updated with CME Branding Colors */

:root {
    /* CME Corporate Colors */
    --cme-primary: #00395c; /* Modrá - primární barva CME */
    --cme-primary-dark: #002840; /* Tmavší modrá pro hover stavy */
    --cme-primary-light: #005580; /* Světlejší modrá pro aktivní stavy */
    --cme-secondary: #00999e; /* Zelená - sekundární barva CME */
    --cme-secondary-dark: #007a7e; /* Tmavší zelená pro hover */
    --cme-secondary-light: #00b3b8; /* Světlejší zelená */
    /* Support Colors */
    --cme-danger: #f44336;
    --cme-warning: #ff9800;
    --cme-success: #4caf50;
    --cme-light: #f8f9fa;
    --cme-gray: #6c757d;
    --cme-white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   HEADER / TOP ROW
======================================== */
.top-row {
    background-color: var(--cme-primary); /* CME modrá */
    border-bottom: 1px solid var(--cme-primary-dark);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 57, 92, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .top-row .logo-container {
        height: 50px;
        display: flex;
        align-items: center;
    }

        .top-row .logo-container img {
            height: 100%;
            width: auto;
            max-height: 50px;
        }

/* ========================================
   CONTENT
======================================== */
.content {
    flex: 1;
    padding: 2rem 1rem;
}

/* ========================================
   CARD STYLES
======================================== */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
    background-color: var(--cme-light);
}

.card.border-primary {
    border: 2px solid var(--cme-primary) !important;
}

.card.border-danger {
    border: 2px solid var(--cme-danger) !important;
}

/* ========================================
   BUTTON STYLES
======================================== */
.btn-primary {
    background-color: var(--cme-primary);
    border-color: var(--cme-primary);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background-color: var(--cme-primary-dark);
        border-color: var(--cme-primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 57, 92, 0.3);
    }

    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary.active {
        background-color: var(--cme-primary-dark) !important;
        border-color: var(--cme-primary-dark) !important;
        box-shadow: 0 0 0 0.25rem rgba(0, 57, 92, 0.25) !important;
    }

    .btn-primary:disabled {
        background-color: var(--cme-gray);
        border-color: var(--cme-gray);
        opacity: 0.65;
    }

/* Secondary button (zelená) */
.btn-secondary {
    background-color: var(--cme-secondary);
    border-color: var(--cme-secondary);
    color: white;
}

    .btn-secondary:hover {
        background-color: var(--cme-secondary-dark);
        border-color: var(--cme-secondary-dark);
    }

/* Outline buttons */
.btn-outline-primary {
    color: var(--cme-primary);
    border-color: var(--cme-primary);
}

    .btn-outline-primary:hover {
        background-color: var(--cme-primary);
        border-color: var(--cme-primary);
        color: white;
    }

.btn-outline-secondary {
    color: var(--cme-secondary);
    border-color: var(--cme-secondary);
}

    .btn-outline-secondary:hover {
        background-color: var(--cme-secondary);
        border-color: var(--cme-secondary);
        color: white;
    }

/* ========================================
   FORM STYLES
======================================== */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--cme-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 57, 92, 0.15);
}

.form-check-input:checked {
    background-color: var(--cme-primary);
    border-color: var(--cme-primary);
}

.form-check-input:focus {
    border-color: var(--cme-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 57, 92, 0.15);
}

/* ========================================
   ALERT STYLES
======================================== */
.alert {
    border-left: 4px solid;
}

.alert-info {
    border-left-color: var(--cme-secondary);
    background-color: rgba(0, 153, 158, 0.1);
    color: var(--cme-secondary-dark);
}

.alert-success {
    border-left-color: var(--cme-success);
}

.alert-warning {
    border-left-color: var(--cme-warning);
}

.alert-danger {
    border-left-color: var(--cme-danger);
}

/* ========================================
   PROGRESS BAR
======================================== */
.progress-bar {
    background-color: var(--cme-secondary);
}

.bg-primary {
    background-color: var(--cme-primary) !important;
}

.bg-secondary {
    background-color: var(--cme-secondary) !important;
}

/* ========================================
   TEXT COLORS
======================================== */
.text-primary {
    color: var(--cme-primary) !important;
}

.text-secondary {
    color: var(--cme-secondary) !important;
}

/* ========================================
   LINKS
======================================== */
a {
    color: var(--cme-primary);
    text-decoration: none;
}

    a:hover {
        color: var(--cme-primary-dark);
        text-decoration: underline;
    }

.nav-link {
    color: var(--cme-primary);
}

    .nav-link:hover {
        color: var(--cme-primary-dark);
    }

    .nav-link.active {
        color: var(--cme-primary) !important;
        font-weight: 600;
    }

/* ========================================
   SIGNATURE PAD STYLES
======================================== */
.signature-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.signature-pad-wrapper {
    border: 2px solid var(--cme-primary);
    border-radius: 8px;
    background: white;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
    overflow: hidden;
}

.signature-canvas {
    display: block;
    cursor: crosshair;
    touch-action: none;
    max-width: 100%;
    height: auto;
}

/* ========================================
   LOADING SPINNER
======================================== */
.spinner-border {
    color: var(--cme-primary);
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.spinner-border.text-primary {
    color: var(--cme-primary) !important;
}

.spinner-border.text-secondary {
    color: var(--cme-secondary) !important;
}

/* ========================================
   BADGES
======================================== */
.badge {
    font-weight: 500;
}

    .badge.bg-primary {
        background-color: var(--cme-primary) !important;
    }

    .badge.bg-secondary {
        background-color: var(--cme-secondary) !important;
    }

/* ========================================
   TABLES
======================================== */
.table-primary {
    background-color: rgba(0, 57, 92, 0.1);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 57, 92, 0.05);
}

/* ========================================
   PAGINATION
======================================== */
.pagination .page-link {
    color: var(--cme-primary);
}

    .pagination .page-link:hover {
        background-color: var(--cme-primary);
        border-color: var(--cme-primary);
        color: white;
    }

.pagination .page-item.active .page-link {
    background-color: var(--cme-primary);
    border-color: var(--cme-primary);
}

/* ========================================
   VALIDATION
======================================== */
.validation-message {
    color: var(--cme-danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid {
    border-color: var(--cme-danger) !important;
}

.valid-feedback {
    color: var(--cme-success);
}

.invalid-feedback {
    color: var(--cme-danger);
}

/* ========================================
   BLAZOR ERROR UI
======================================== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ========================================
   LOGO SECTION (Homepage)
======================================== */
.logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

    .logo-section img {
        max-width: 400px;
        width: 100%;
        height: auto;
        margin-bottom: 1rem;
    }

    .logo-section h1 {
        color: var(--cme-primary);
        font-weight: 600;
        margin-top: 1rem;
    }

.card-header-cme {
    background-color: #00395c;
    color: white;
}


/* ========================================
   CUSTOM SCROLLBAR
======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--cme-primary);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--cme-primary-dark);
    }

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .top-row {
        padding: 1rem;
    }

        .top-row .logo-container {
            height: 40px;
        }

    .content {
        padding: 1rem 0.5rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
    }

    .signature-canvas {
        width: 100% !important;
        height: 200px !important;
    }

    .logo-section img {
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .top-row {
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-section img {
        max-width: 250px;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .btn,
    .top-row,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* ========================================
   UTILITY CLASSES
======================================== */
.text-cme-primary {
    color: var(--cme-primary) !important;
}

.text-cme-secondary {
    color: var(--cme-secondary) !important;
}

.bg-cme-primary {
    background-color: var(--cme-primary) !important;
}

.bg-cme-secondary {
    background-color: var(--cme-secondary) !important;
}

.border-cme-primary {
    border-color: var(--cme-primary) !important;
}

.border-cme-secondary {
    border-color: var(--cme-secondary) !important;
}
