/* ===================================================================
   MANIPAL QUEST 3.0 - ABSTRACT SUBMISSION STYLESHEET
   Kasturba Medical College (KMC), Manipal | MAHE
   WCAG AA Compliant Multi-Step Form UI
   =================================================================== */

:root {
    --primary: #0b4f6c;
    --primary-dark: #073447;
    --primary-light: #e0f2fe;
    --secondary: #0284c7;
    --accent: #d97706;
    --accent-light: #fef3c7;
    --success: #15803d;
    --success-light: #dcfce7;
    --danger: #b91c1c;
    --danger-light: #fee2e2;
    --dark: #0f172a;
    --slate: #334155;
    --muted: #475569;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #cbd5e1;
    --border-focus: #0284c7;
    --font-heading: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --font-times: 'Times New Roman', Times, serif;
}

body {
    background: #f1f5f9;
    font-family: var(--font-heading);
    color: var(--dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header & Banner */
.mq-header {
    background: linear-gradient(135deg, #072a38 0%, #0b4f6c 55%, #0369a1 100%);
    color: #ffffff;
    padding: 35px 20px 25px;
    box-shadow: 0 4px 20px rgba(7, 42, 56, 0.25);
    position: relative;
    overflow: hidden;
}

.mq-header .institution-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.mq-header h1 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0 0 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mq-header .sub-title {
    font-size: 1.15rem;
    color: #e0f2fe;
    margin-bottom: 8px;
    font-weight: 600;
}

.mq-header .theme-tag {
    display: inline-block;
    background: #b45309;
    color: #ffffff;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.mq-header-meta {
    margin-top: 15px;
    font-size: 13.5px;
    color: #f0f9ff;
}

.mq-header-meta span {
    margin: 4px 15px;
    display: inline-block;
}

/* Multi-Step Stepper / Progress Wizard */
.wizard-stepper {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 30px;
    margin-top: -20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--border-color);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wizard-steps::before {
    content: "";
    position: absolute;
    top: 22px;
    left: 45px;
    right: 45px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.wizard-progress-bar {
    position: absolute;
    top: 22px;
    left: 45px;
    height: 4px;
    background: var(--secondary);
    z-index: 2;
    transition: width 0.35s ease;
    width: 0%;
}

.wizard-step {
    position: relative;
    z-index: 3;
    text-align: center;
    cursor: pointer;
    flex: 1;
}

.wizard-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #cbd5e1;
    color: var(--muted);
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin-bottom: 8px;
}

.wizard-step-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--muted);
    transition: color 0.3s;
}

.wizard-step.active .wizard-step-circle {
    background: var(--primary);
    border-color: var(--secondary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

.wizard-step.active .wizard-step-label {
    color: var(--primary);
}

.wizard-step.completed .wizard-step-circle {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.wizard-step.completed .wizard-step-label {
    color: var(--success);
}

/* Template Download Card */
.template-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    border-left: 5px solid var(--primary);
    padding: 16px 22px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.template-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0b4f6c;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    margin: 4px 6px 4px 0;
}

.template-download-btn:hover {
    background: #073447;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(11, 79, 108, 0.3);
}

/* Form Container Card */
.form-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 35px;
}

.wizard-panel {
    display: none;
    padding: 28px 30px;
}

.wizard-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-panel-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Controls & Floating Labels */
.form-label {
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
    margin-bottom: 6px;
    display: block;
}

.form-label .required {
    color: #b91c1c;
    margin-left: 3px;
    font-weight: bold;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    padding: 10px 14px;
    font-size: 14.5px;
    color: #0f172a;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus, .form-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
    outline: none;
}

.field-helper {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 5px;
    display: block;
}

/* Radio Option Cards (Registration Status) */
.radio-cards-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    margin: 12px 0 16px;
}

.radio-card {
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.radio-card:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.radio-card.selected {
    border-color: #0b4f6c;
    background: #e0f2fe;
    box-shadow: 0 2px 8px rgba(11, 79, 108, 0.15);
}

.radio-card input[type="radio"] {
    margin-top: 3px;
    accent-color: #0b4f6c;
    width: 18px;
    height: 18px;
}

.radio-card-content h6 {
    margin: 0 0 3px;
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.radio-card-content p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

/* Smart Textarea & Bottom-Right Word Counter */
.textarea-wrapper {
    position: relative;
    border-radius: 8px;
}

.abstract-textarea {
    font-family: var(--font-times);
    font-size: 15px;
    line-height: 1.55;
    padding-bottom: 35px;
    border-radius: 8px;
    width: 100%;
}

.smart-word-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 15px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.smart-word-counter.safe {
    color: var(--success);
    background: #f0fdf4;
    border-color: #86efac;
}

.smart-word-counter.warning {
    color: var(--accent);
    background: #fffbeb;
    border-color: #fde68a;
}

.smart-word-counter.danger {
    color: var(--danger);
    background: #fef2f2;
    border-color: #fca5a5;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.04); }
}

/* Callout Box inside Section 2 */
.guideline-callout {
    background: #f0f9ff;
    border-left: 4px solid #0284c7;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #0c4a6e;
    line-height: 1.5;
}

/* Modern Drag-and-Drop Dropzones */
.upload-dropzone {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 10px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    margin-bottom: 15px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: #0b4f6c;
    background: #e0f2fe;
}

.upload-dropzone .dz-icon {
    font-size: 32px;
    color: #0284c7;
    margin-bottom: 8px;
}

.upload-dropzone .dz-title {
    font-weight: 700;
    font-size: 14.5px;
    color: #0f172a;
    margin-bottom: 4px;
}

.upload-dropzone .dz-hint {
    font-size: 12.5px;
    color: var(--muted);
}

.upload-dropzone .dz-selected-tag {
    display: none;
    margin-top: 10px;
    background: #dcfce7;
    color: #15803d;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid #86efac;
}

/* Inline Validation States */
.is-valid-field {
    border-color: #15803d !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2315803d' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.is-invalid-field {
    border-color: #b91c1c !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23b91c1c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23b91c1c' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.field-error-msg {
    display: none;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

/* Security Verification (Clean Modern Card) */
.security-card {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px 18px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.security-badge {
    background: #0b4f6c;
    color: #ffffff;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 16px;
    letter-spacing: 1px;
}

/* Wizard Navigation Bar */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-wizard-next, .btn-submit-abstract {
    background: linear-gradient(135deg, #0b4f6c 0%, #0284c7 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(11, 79, 108, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-wizard-next:hover, .btn-submit-abstract:hover {
    background: linear-gradient(135deg, #073447 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(11, 79, 108, 0.35);
    color: #ffffff;
}

.btn-wizard-prev {
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-wizard-prev:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.clear-draft-link {
    color: #64748b;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.clear-draft-link:hover {
    color: #b91c1c;
}

/* Closed Submission Panel */
.closed-card {
    background: #fff;
    border: 1px solid #fee2e2;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    margin: 40px auto;
    max-width: 650px;
}

.closed-card h3 {
    color: #b91c1c;
    font-weight: 800;
    margin-bottom: 12px;
}

/* Footer */
.mq-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 30px 20px 20px;
    font-size: 13px;
    text-align: center;
    border-top: 4px solid var(--primary);
}

.mq-footer a {
    color: #38bdf8;
    text-decoration: none;
}

.mq-footer a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wizard-step-label {
        font-size: 11px;
    }
    .wizard-step-circle {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    .wizard-panel {
        padding: 20px 16px;
    }
    .wizard-nav {
        padding: 14px 16px;
    }
}
