/* Medical Conference Registration - Custom Styles */
/* Theme colors matching ENDOCON 2026 website */

:root {
    --primary-color: #1a1f3a; /* Dark navy blue */
    --secondary-color: #00bcd4; /* Teal/Cyan accent */
    --accent-color: #ff9800; /* Orange accent */
    --success-color: #4caf50; /* Green */
    --danger-color: #f44336; /* Red */
    --warning-color: #ffc107; /* Yellow */
    --info-color: #00bcd4; /* Teal */
    --light-bg: #f8f9fa;
    --dark-text: #1a1f3a;
}

/* Fix horizontal scrollbar */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    color: var(--dark-text);
}

/* Prevent all containers from causing horizontal scroll */
.container,
.container-fluid,
.row {
    max-width: 100%;
    overflow-x: hidden;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* Fix rupee symbol display */
.rupee::before,
.currency-inr::before {
    content: "₹";
    font-family: Arial, sans-serif;
}

/* Ensure tables don't overflow */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    max-width: 100%;
}

.container {
    flex: 1;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

    .nav-link:hover {
        transform: translateY(-2px);
    }

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    border-top: 3px solid var(--secondary-color);
}

    .card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 188, 212, 0.15);
        transform: translateY(-5px);
    }

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #2a3f5f);
    color: white;
    font-weight: bold;
    border-bottom: 2px solid var(--secondary-color);
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--dark-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 188, 212, 0.25);
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2a3f5f);
    border: none;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #2a3f5f, var(--primary-color));
    }

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #00acc1);
    border: none;
}

    .btn-success:hover {
        background: linear-gradient(135deg, #00acc1, var(--secondary-color));
    }

.btn-warning {
    background: linear-gradient(135deg, var(--accent-color), #fb8c00);
    border: none;
    color: white;
}

    .btn-warning:hover {
        background: linear-gradient(135deg, #fb8c00, var(--accent-color));
        color: white;
    }

/* Progress Bar */
.progress-step {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.progress-step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

    .progress-step-item::before {
        content: '';
        position: absolute;
        top: 20px;
        left: -50%;
        width: 100%;
        height: 3px;
        background-color: #dee2e6;
        z-index: -1;
    }

    .progress-step-item:first-child::before {
        display: none;
    }

    .progress-step-item.active::before {
        background-color: var(--primary-color);
    }

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #dee2e6;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.progress-step-item.active .progress-step-circle {
    background: linear-gradient(135deg, var(--secondary-color), #00acc1);
    color: white;
}

.progress-step-item.completed .progress-step-circle {
    background: linear-gradient(135deg, var(--success-color), #66bb6a);
    color: white;
}

/* Pricing Box */
.pricing-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a3f5f 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    border: 2px solid var(--secondary-color);
}

    .pricing-box h3 {
        font-size: 2.5rem;
        font-weight: bold;
        color: var(--secondary-color);
    }

.pricing-breakdown {
    background: white;
    color: var(--dark-text);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

    .pricing-breakdown .row {
        padding: 0.5rem 0;
        border-bottom: 1px solid #dee2e6;
    }

        .pricing-breakdown .row:last-child {
            border-bottom: none;
            font-weight: bold;
            font-size: 1.2rem;
            color: var(--secondary-color);
        }

/* Tables */
.table {
    background: white;
}

    .table thead {
        background: linear-gradient(135deg, var(--primary-color), #2a3f5f);
        color: white;
    }

.table-hover tbody tr:hover {
    background-color: rgba(0, 188, 212, 0.1);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.bg-success {
    background: linear-gradient(135deg, var(--secondary-color), #00acc1) !important;
}

.text-success {
    color: var(--secondary-color) !important;
}

/* Alert */
.alert {
    border: none;
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
}

    /* Alert spacing - ensure proper space around alerts */
    .alert + * {
        margin-top: 1rem;
    }

* + .alert {
    margin-top: 1rem;
}

/* Specific alert contexts */
.card-body .alert:first-child {
    margin-top: 0;
}

.card-body .alert:last-child {
    margin-bottom: 0;
}

/* Alert icons spacing */
.alert i {
    margin-right: 0.5rem;
}

/* Dashboard Stats */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.1);
}

    .stat-card h3 {
        font-size: 2rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
        color: var(--primary-color);
    }

    .stat-card p {
        color: #6c757d;
        margin-bottom: 0;
    }

/* File Upload */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

    .file-upload-wrapper input[type=file] {
        font-size: 100px;
        position: absolute;
        left: 0;
        top: 0;
        opacity: 0;
    }

/* Footer */
footer {
    margin-top: auto;
}

/* Banner Image */
.banner-image {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.2);
    border-bottom: 3px solid var(--secondary-color);
}

    .banner-image img {
        width: 100%;
        height: auto;
        display: block;
        max-height: 200px;
        object-fit: cover;
    }

/* Responsive */
@media (max-width: 768px) {
    .progress-step {
        flex-direction: column;
    }

    .progress-step-item::before {
        display: none;
    }

    .pricing-box h3 {
        font-size: 2rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }
}

/* ============================================
   GLOBAL RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Toast/Alert messages - fixed position on mobile */
.alert-fixed {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================
   SITE MASTER - PUBLIC PAGES
   ============================================ */

/* Banner responsive */
.banner-image img {
    max-height: 180px;
}

@media (max-width: 576px) {
    .banner-image img {
        max-height: 100px;
    }

    /* Main content padding on mobile */
    div[style*="padding: 2rem 0"] {
        padding: 1rem 0 !important;
    }
}

/* ============================================
   REGISTRATION PAGE
   ============================================ */

@media (max-width: 768px) {
    /* Registration form layout */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Pricing summary sidebar stacks below form */
    .col-lg-8, .col-lg-4 {
        width: 100% !important;
    }

    /* Sticky pricing card - not sticky on mobile */
    .sticky-top {
        position: relative !important;
        top: auto !important;
    }

    /* Form sections */
    .section-divider h5 {
        font-size: 1rem;
    }

    /* Buttons full width on mobile */
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Pricing summary */
    .pricing-breakdown .row {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .col-md-6, .col-md-4, .col-md-3 {
        margin-bottom: 0.5rem;
    }

    /* Accompanying person cards */
    .card.mb-3 .card-body {
        padding: 0.75rem;
    }
}

/* ============================================
   DASHBOARD PAGE
   ============================================ */

@media (max-width: 768px) {
    /* Dashboard action cards */
    .col-md-3 {
        margin-bottom: 1rem;
    }

    /* Payment table */
    .table-responsive {
        font-size: 0.85rem;
    }

    .table td, .table th {
        padding: 0.5rem;
    }

    /* Action buttons in table */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   REVIEW PAGE
   ============================================ */

@media (max-width: 768px) {
    .pricing-breakdown {
        padding: 1rem;
    }

    .pricing-breakdown .row {
        font-size: 0.9rem;
    }

    /* Terms checkbox area */
    .form-check-label {
        font-size: 0.9rem;
    }

    /* Proceed button */
    #btnProceedToPayment {
        width: 100%;
    }
}

/* ============================================
   MANAGE REGISTRATION PAGE (USER)
   ============================================ */

@media (max-width: 768px) {
    /* Sidebar status card stacks below */
    .col-lg-4 {
        margin-top: 1.5rem;
    }

    /* Accompanying persons table */
    .table th, .table td {
        font-size: 0.85rem;
        padding: 0.4rem;
    }

    /* Add person form */
    .row.g-2 .col-md-9,
    .row.g-2 .col-md-3 {
        width: 100%;
    }

    .row.g-2 .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ============================================
   ADMIN MASTER - ADMIN PAGES
   ============================================ */

@media (max-width: 992px) {
    /* Sidebar collapses */
    .col-md-2 {
        width: 100% !important;
        margin-bottom: 1rem;
    }

    .col-md-10 {
        width: 100% !important;
    }

    /* Sidebar becomes horizontal nav */
    .list-group.sidebar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        border-radius: 8px;
        overflow: hidden;
    }

    .list-group.sidebar .list-group-item {
        flex: 1;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.85rem;
        border-left: none !important;
        border-bottom: 3px solid transparent;
    }

    .list-group.sidebar .list-group-item.active {
        border-bottom-color: #007bff;
    }
}

@media (max-width: 768px) {
    /* Admin navbar */
    .navbar-text {
        font-size: 0.85rem;
    }

    /* Admin content padding */
    .container-fluid.mt-4 {
        padding: 0.5rem;
    }

    /* Manage Registrations filter section */
    .filter-section {
        padding: 12px !important;
    }

    /* Stats cards */
    .col-md-3 {
        margin-bottom: 0.75rem;
    }

    /* Grid table horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Export buttons stack */
    .btn-export, .btn-filter, .btn-clear {
        width: 100%;
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }

    /* Modal full screen on mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-xl {
        max-width: calc(100% - 1rem);
    }
}

@media (max-width: 576px) {
    /* Admin dashboard stats */
    .card-body h3 {
        font-size: 1.5rem;
    }

    /* Pagination */
    .pagination-style {
        font-size: 0.8rem;
    }

    /* Result info label */
    .result-info {
        font-size: 0.85rem;
    }

    /* Records per page */
    div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        gap: 0.5rem;
    }
}

/* ============================================
   TARIFF PAGE
   ============================================ */

@media (max-width: 768px) {
    .table th, .table td {
        font-size: 0.8rem;
        padding: 0.4rem 0.3rem;
        white-space: nowrap;
    }

    .table-responsive {
        border-radius: 8px;
    }
}

/* ============================================
   LOGIN / DEFAULT PAGES
   ============================================ */

@media (max-width: 576px) {
    .card {
        margin: 0 0.5rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* ============================================
   GLOBAL MESSAGE/ALERT IMPROVEMENTS
   ============================================ */

/* All alerts get proper spacing and visibility */
.alert {
    border-radius: 10px;
    border: none;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert .btn-close {
    margin-left: auto;
    flex-shrink: 0;
}

/* Success messages */
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* Error messages */
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Warning messages */
.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* Info messages */
.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Auto-dismiss alerts after 5 seconds */
.alert-auto-dismiss {
    animation: fadeOut 0.5s ease 5s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; max-height: 200px; }
    to   { opacity: 0; max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* ============================================
   GENERAL TOUCH-FRIENDLY IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .form-control, .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Better spacing between form groups */
    .mb-3 {
        margin-bottom: 1rem !important;
    }

    /* Cards no hover transform on touch */
    .card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }
}
