* {
    font-family: sans-serif;
}

.submit-button:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
    border-color: #999999 !important;
    opacity: 0.7;
}

/* Result query and display containers styling */
.result-details {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: none;
    text-align: left;
}

.result-details h3 {
    margin: 0 0 15px 0;
    color: #800000;
    font-size: 20px;
    font-weight: bold;
}

.result-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: bold;
    color: #495057;
    width: 150px;
    flex-shrink: 0;
}

.result-value {
    color: #212529;
    flex: 1;
}

.pdf-link {
    display: inline-block;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    margin-top: 10px;
}

.pdf-link:hover {
    background: #218838;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 20px 0;
    display: none;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 20px 0;
    display: none;
    text-align: center;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    display: none;
    font-weight: bold;
}

/* Custom text input next to Subject Wise Marks */
.front-custom-text-input {
    border: 2px solid #800000;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #800000;
    background-color: #fff;
    width: 250px;
    text-align: center;
    transition: all 0.3s ease;
}

.front-custom-text-input:focus {
    outline: none;
    border-color: #0b3c9b;
    box-shadow: 0 0 5px rgba(11, 60, 155, 0.5);
    color: #0b3c9b;
}

/* Print styles to show only the result card and hide form/nav/footer */
@media print {
    nav, footer, .topsec, .navbottomstrip, #resultForm, .loading, .error-message, .success-message, .print-hide {
        display: none !important;
    }
    
    .enter-details-card-body > div:first-child {
        display: none !important;
    }
    
    body, html {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }
    
    .homeannounce, .container, .row, .marks-padding-div, .enter-details-card, .enter-details-card-body {
        background: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .result-details {
        display: block !important;
        border: none !important;
        box-shadow: none !important;
        padding: 10px 0 !important;
        margin: 0 0 15px 0 !important;
        background: transparent !important;
        page-break-inside: avoid !important;
    }

    .row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .col-8 {
        width: 66.666667% !important;
        flex: 0 0 66.666667% !important;
        max-width: 66.666667% !important;
    }

    .col-4 {
        width: 33.333333% !important;
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
    
    table {
        page-break-inside: avoid !important;
        width: 100% !important;
    }

    .front-custom-text-input {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        text-align: right !important;
        width: auto !important;
        box-shadow: none !important;
        color: #800000 !important;
        font-weight: 600 !important;
    }
    
    .front-custom-text-input::placeholder {
        color: transparent !important;
    }
    
    .front-custom-text-input:placeholder-shown {
        display: none !important;
    }

    @page {
        size: portrait;
        margin: 10mm;
    }
}
