/* 
   CA Foundation Results Portal - Stylesheet
   Designed to replicate the official ICAI Exam Results Portal (icai.nic.in)
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f6f8fb;
    color: #333333;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    background-color: #ffffff;
    border-bottom: 3px solid #023c6c;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.icai-logo {
    width: 75px;
    height: 75px;
    margin-right: 20px;
    object-fit: contain;
}

.header-text h1 {
    color: #023c6c;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.header-text h2 {
    color: #cc0000;
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 2px;
}

.header-text h3 {
    color: #666666;
    font-size: 13px;
    font-weight: normal;
}

/* Navigation bar if any */
.nav-banner {
    background-color: #023c6c;
    color: #ffffff;
    padding: 8px 0;
    font-size: 13px;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
}

.nav-container a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.nav-container a:hover {
    text-decoration: underline;
}

/* Main Content Wrapper */
main {
    flex: 1;
    max-width: 850px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}

/* Landing Portal Links Box */
.portal-card {
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 25px;
}

.card-title {
    background-color: #f1f5f9;
    border-bottom: 1px solid #dcdcdc;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: bold;
    color: #023c6c;
}

.portal-body {
    padding: 20px;
}

.info-text {
    margin-bottom: 20px;
    color: #555555;
    font-style: italic;
}

.result-links-list {
    list-style: none;
}

.result-links-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.result-links-list li:last-child {
    border-bottom: none;
}

.result-links-list a {
    color: #0066cc;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.result-links-list a:hover {
    color: #cc0000;
    text-decoration: underline;
}

.new-tag {
    background-color: #cc0000;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    text-transform: uppercase;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Form Styles */
.form-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.form-table td {
    padding: 10px;
    vertical-align: middle;
}

.form-label {
    font-weight: bold;
    color: #333333;
    width: 35%;
    text-align: right;
    padding-right: 20px;
}

.form-input-container {
    width: 65%;
}

.form-input {
    width: 250px;
    padding: 8px 10px;
    border: 1px solid #b3cedb;
    border-radius: 3px;
    font-size: 14px;
    outline: none;
}

.form-input:focus {
    border-color: #023c6c;
    box-shadow: 0 0 4px rgba(2, 60, 108, 0.2);
}

/* Captcha container */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-canvas {
    background-color: #ffffff;
    border: 1px solid #b3cedb;
    border-radius: 3px;
    cursor: pointer;
}

.captcha-refresh-btn {
    background: none;
    border: none;
    color: #0066cc;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
}

.captcha-refresh-btn:hover {
    color: #cc0000;
}

/* Form Action Buttons */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.btn {
    padding: 8px 24px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}

.btn-primary {
    background-color: #023c6c;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #01284a;
}

.btn-secondary {
    background-color: #718096;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #4a5568;
}

/* Scorecard Styles */
.scorecard-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #023c6c;
}

.scorecard-header h2 {
    color: #023c6c;
    font-size: 18px;
    margin-bottom: 5px;
}

.scorecard-header h3 {
    color: #333333;
    font-size: 14px;
    font-weight: normal;
}

.candidate-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background-color: #fcfdfd;
    border: 1px solid #dce4ec;
}

.candidate-info-table td {
    padding: 10px 15px;
    border: 1px solid #dce4ec;
}

.candidate-info-table td.label {
    font-weight: bold;
    color: #555555;
    width: 25%;
    background-color: #f7fafc;
}

.candidate-info-table td.value {
    color: #1a202c;
    width: 75%;
}

/* Marks details table */
.marks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #cbd5e0;
}

.marks-table th {
    background-color: #023c6c;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    padding: 10px 8px;
    border: 1px solid #cbd5e0;
    font-size: 13px;
}

.marks-table td {
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    font-size: 13px;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.marks-table tr:nth-child(even) {
    background-color: #f7fafc;
}

.total-row {
    font-weight: bold;
    background-color: #edf2f7 !important;
}

/* Result Status Banner */
.result-status-container {
    text-align: center;
    margin: 25px 0;
    padding: 15px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
}

.status-pass {
    background-color: #e6fffa;
    border: 2px solid #319795;
    color: #234e52;
}

.status-fail {
    background-color: #fff5f5;
    border: 2px solid #e53e3e;
    color: #742a2a;
}

.result-status-text {
    font-size: 24px;
    margin-top: 5px;
}

.status-pass .result-status-text {
    color: #2b6cb0;
    color: #2f855a;
}

.status-fail .result-status-text {
    color: #c53030;
}

.note-box {
    background-color: #fffaf0;
    border-left: 4px solid #dd6b20;
    padding: 15px;
    margin-top: 30px;
    font-size: 12px;
    color: #4a5568;
}

.note-box p {
    margin-bottom: 5px;
}

.note-box p:last-child {
    margin-bottom: 0;
}

/* Print utilities */
.print-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

/* Footer Styles */
footer {
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
    padding: 20px;
    text-align: center;
    color: #718096;
    font-size: 12px;
    margin-top: auto;
}

footer p {
    margin-bottom: 5px;
}

footer a {
    color: #4a5568;
    text-decoration: underline;
}

footer a:hover {
    color: #2d3748;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .icai-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .form-table td {
        display: block;
        width: 100%;
        text-align: left;
        padding: 5px 10px;
    }

    .form-label {
        padding-right: 0;
        margin-bottom: 4px;
    }

    .form-input {
        width: 100%;
    }

    .captcha-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .candidate-info-table td {
        display: block;
        width: 100% !important;
    }

    .candidate-info-table td.label {
        border-bottom: none;
    }
}

@media print {
    body {
        background-color: #ffffff;
    }
    
    main {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }

    .portal-card {
        border: none;
        box-shadow: none;
    }

    .print-actions, footer, .nav-banner {
        display: none !important;
    }
}
