/* ========================================
   Cover Page Preview Styles
   Matches the UIU Assignment Cover Format
   ======================================== */

/* CSS Variables for theming */
.cover-page {
    --theme-color: #E86C31;
    --theme-color-light: rgba(232, 108, 49, 0.15);
}

/* Cover Page Container */
.cover-page {
    width: 100%;
    aspect-ratio: 210 / 297; /* A4 aspect ratio */
    background: white;
    color: #000; /* Default text black */
    font-family: 'Poppins', 'Arial', sans-serif;
    position: relative;
    padding: 40px; /* Increased padding */
    box-sizing: border-box;
    overflow: hidden;
}

/* Outer Border */
.cover-page::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 3px solid var(--theme-color);
    pointer-events: none;
    z-index: 1;
}

/* Inner content wrapper */
.cover-page > * {
    position: relative;
    z-index: 2;
}

/* ========================================
   Header Section (Logo + University Name)
   ======================================== */
.cover-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px; /* Reduced from 30px */
    margin-top: 5px;
}

.university-logo {
    width: 115px; /* Increased from 90px */
    height: 115px;
    flex-shrink: 0;
}

.university-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    background: var(--theme-color-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-color);
}

.logo-placeholder svg {
    width: 45px;
    height: 45px;
}

.university-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 0.95;
}

.university-name .line1 {
    font-size: 38px; /* Reduced from 42px */
    font-weight: 800;
    color: #000;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.university-name .line2 {
    font-size: 24px; /* Reduced from 26px */
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.university-name .line3 {
    font-size: 24px; /* Reduced from 26px */
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Assignment Number Banner
   ======================================== */
.assignment-banner {
    background: var(--theme-color);
    border: 2px solid var(--theme-color);
    border-radius: 50px;
    padding: 10px 40px; /* Compact padding */
    text-align: center;
    margin: 0 auto 20px; /* Reduced margin */
    width: fit-content;
    white-space: nowrap;
}

.assignment-banner span {
    font-size: 26px; /* Reduced from 28px */
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

/* ========================================
   Divider Line
   ======================================== */
.divider {
    height: 3px;
    background: #000;
    margin: 0 10px 30px; /* Reduced margin */
    border-radius: 2px;
}

/* ========================================
   Course Details Section
   ======================================== */
.course-details {
    padding: 0 40px;
    margin-bottom: 30px; /* Reduced from 50px */
}

.detail-row {
    display: flex;
    align-items: center; /* Center alignment */
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.4;
    color: #000;
}

.detail-label {
    font-weight: 800;
    color: #000;
    width: 140px;
    flex-shrink: 0;
}

.detail-separator {
    margin-right: 15px;
    font-weight: 800;
}

.detail-value {
    font-weight: 500;
    color: #000;
    text-decoration: none;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

/* ========================================
   Watermark
   ======================================== */
.watermark {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    opacity: 0.40; /* Increased from 0.06 */
    pointer-events: none;
    z-index: 0;
}

.watermark-logo {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
}

.watermark-logo svg,
.watermark-logo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    color: var(--theme-color);
}

/* ========================================
   Submission Section
   ======================================== */
.submission-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
    margin-top: 20px;
    gap: 30px; /* Compact gap */
}

.submission-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.submission-title {
    font-size: 20px;
    font-weight: 800;
    color: #000;
    padding-bottom: 2px;
    margin-bottom: 15px;
    border-bottom: 3px solid #000;
    display: inline-block;
    align-self: flex-start; /* Align left */
    text-align: left;
    width: 100%; /* Full width underline */
}

.submission-content {
    font-size: 16px; /* Matched size */
    line-height: 1.5;
    color: #000;
    padding-left: 0; /* Remove indent */
}

/* Submitted By Content */
.student-info {
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
    margin-bottom: 6px;
}

.info-label {
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    width: 65px; /* Fixed width for alignment */
    flex-shrink: 0;
    text-align: left;
}

.info-separator {
    font-weight: 700;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.info-value {
    color: #000;
    font-weight: 500;
    word-break: break-word;
    flex: 1;
}

/* Submitted To Content */
.instructor-info .info-row {
    margin-bottom: 6px;
}

.designation-row {
    margin-top: 4px;
    display: block;
}

.designation-row .info-label {
    display: inline-block;
    margin-bottom: 2px;
}

.designation-row .info-value {
    display: block;
    line-height: 1.4;
}

/* ========================================
   Responsive adjustments for preview
   ======================================== */
@media (max-width: 650px) {
    .cover-page {
        padding: 20px;
    }
    
    .cover-page::before {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-width: 2px;
    }
    
    .cover-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .university-logo {
        width: 80px;
        height: 80px;
    }
    
    .university-name {
        align-items: center;
    }
    
    .university-name .line1 { font-size: 24px; }
    .university-name .line2 { font-size: 16px; }
    .university-name .line3 { font-size: 16px; }
    
    .assignment-banner {
        padding: 8px 20px;
        margin-bottom: 15px;
    }
    
    .assignment-banner span { font-size: 16px; }
    
    .divider {
        margin: 0 5px 20px;
        height: 2px;
    }
    
    .course-details {
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .detail-row {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .detail-label {
        width: 90px;
    }
    
    .submission-section {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
        margin-top: 15px;
    }
    
    .submission-title {
        font-size: 16px;
        margin-bottom: 10px;
        border-bottom-width: 2px;
    }
    
    .submission-content {
        font-size: 13px;
    }
    
    .info-label {
        width: 55px;
        font-size: 12px;
    }
    
    .watermark {
        width: 50%;
        opacity: 0.25;
    }
}

@media (max-width: 480px) {
    .cover-page {
        padding: 15px;
    }
    
    .cover-page::before {
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
    
    .cover-header {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .university-logo {
        width: 60px;
        height: 60px;
    }
    
    .logo-placeholder svg {
        width: 30px;
        height: 30px;
    }
    
    .university-name .line1 { font-size: 18px; }
    .university-name .line2 { font-size: 12px; }
    .university-name .line3 { font-size: 12px; }
    
    .assignment-banner {
        padding: 6px 15px;
        margin-bottom: 12px;
    }
    
    .assignment-banner span { font-size: 13px; }
    
    .divider {
        margin: 0 5px 15px;
    }
    
    .course-details {
        padding: 0 5px;
        margin-bottom: 15px;
    }
    
    .detail-row {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .detail-label {
        width: 75px;
    }
    
    .detail-separator {
        margin-right: 8px;
    }
    
    .submission-section {
        gap: 15px;
        padding: 0 5px;
        margin-top: 10px;
    }
    
    .submission-title {
        font-size: 14px;
        margin-bottom: 8px;
        padding-bottom: 2px;
    }
    
    .submission-content {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .info-row {
        margin-bottom: 4px;
    }
    
    .info-label {
        width: 45px;
        font-size: 10px;
    }
    
    .info-separator {
        width: 15px;
    }
    
    .info-value {
        font-size: 10px;
    }
    
    .designation-row .info-value {
        font-size: 10px;
    }
    
    .watermark {
        width: 45%;
        opacity: 0.2;
    }
}

@media (max-width: 400px) {
    .cover-page {
        padding: 12px;
    }
    
    .cover-page::before {
        top: 6px;
        left: 6px;
        right: 6px;
        bottom: 6px;
        border-width: 1.5px;
    }
    
    .university-logo {
        width: 50px;
        height: 50px;
    }
    
    .logo-placeholder svg {
        width: 25px;
        height: 25px;
    }
    
    .university-name .line1 { font-size: 15px; }
    .university-name .line2 { font-size: 10px; }
    .university-name .line3 { font-size: 10px; }
    
    .assignment-banner {
        padding: 5px 12px;
        border-radius: 30px;
    }
    
    .assignment-banner span { font-size: 11px; }
    
    .detail-row {
        font-size: 10px;
    }
    
    .detail-label {
        width: 65px;
    }
    
    .submission-title {
        font-size: 12px;
    }
    
    .submission-content,
    .info-label,
    .info-value {
        font-size: 9px;
    }
    
    .info-label {
        width: 40px;
    }
}

@media (max-width: 360px) {
    .cover-page {
        padding: 10px;
    }
    
    .cover-page::before {
        top: 5px;
        left: 5px;
        right: 5px;
        bottom: 5px;
        border-width: 1px;
    }
    
    .cover-header {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .university-logo {
        width: 45px;
        height: 45px;
    }
    
    .university-name .line1 { font-size: 13px; }
    .university-name .line2 { font-size: 9px; }
    
    .assignment-banner {
        padding: 4px 10px;
    }
    
    .assignment-banner span { font-size: 10px; }
    
    .divider {
        height: 1.5px;
        margin: 0 3px 10px;
    }
    
    .detail-row {
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    .detail-label {
        width: 55px;
    }
    
    .submission-section {
        gap: 12px;
    }
    
    .submission-title {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .submission-content,
    .info-label,
    .info-value {
        font-size: 8px;
    }
    
    .info-label {
        width: 35px;
    }
    
    .info-separator {
        width: 12px;
    }
    
    .watermark {
        width: 40%;
        opacity: 0.15;
    }
}

/* ========================================
   Print/PDF Specific Styles
   ======================================== */
/* ========================================
   Print/PDF Specific Styles
   ======================================== */
@media print {
    .cover-page {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 40px;
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

.cover-page.pdf-mode {
    width: 210mm !important;
    height: 297mm !important;
    min-height: unset !important;
    max-height: 297mm !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 30px !important;
    box-shadow: none !important;
    transform: none !important;
    position: relative !important;
    background: white !important;
    overflow: hidden !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.cover-page.pdf-mode * {
    transform: none !important;
    animation: none !important;
}


