@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
}
.container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    gap: 2rem;
    padding: 2rem 1rem;
}
.form-container, .preview-container {
    flex: 1;
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
}
.resume-container {
    border: 1px solid black;
    outline: 2px solid black;
    outline-offset: -5px;
    padding: 2.5rem 1.5rem 0.5rem 1.5rem;
    line-height: 1.3;
    color: #333;
    background-color: #fff;
}
.resume-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 1.5rem;
}
.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
}
.resume-header .header-left {
    flex-grow: 1;
}
.resume-header.photo-removed .header-left {
    border-bottom: none;
}
.resume-header .header-right {
    width: 120px;
    height: 150px;
    border: 1px solid #ccc;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 1rem;
}
.resume-header .header-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contact-details-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}
.resume-section-title {
    font-size: 1.25rem;
    font-weight: bold;
    border-bottom: 1px solid #666;
    padding-bottom: 0.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.resume-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.resume-table th, .resume-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
.resume-table th {
    background-color: #f2f2f2;
}
.bullet-list.preview-list {
    list-style-type: disc;
    padding-left: 2rem;
}
.bullet-list.preview-list li {
    line-height: 1.2;
    margin-bottom: 0;
}
.declaration {
    text-align: justify;
}
.footer-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}
.print-btn {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.print-btn:hover {
    background-color: #0056b3;
}

/* New CSS for drag-and-drop */
.form-section {
    padding: 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    transition: transform 0.2s ease-in-out;
}
.form-section.dragging {
    opacity: 0.5;
    background-color: #d1d5db;
}
.drag-handle {
    cursor: move;
    font-size: 1.5rem;
    color: #aaa;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
}
.draggable {
    cursor: grab;
}
.draggable .drag-handle {
    position: static;
    display: inline-block;
    margin-right: 0.5rem;
}

@media print {
    body {
        background-color: #fff;
    }
    .form-container, .print-hide, .ad-placeholder, .footer {
        display: none !important;
    }
    .container {
        display: block;
        padding: 0;
    }
    .preview-container {
        width: 100%;
        box-shadow: none;
        padding: 0;
    }
    .resume-container {
        border: 1px solid black;
        outline: 2px solid black;
        outline-offset: -5px;
        box-shadow: none;
        min-height: auto;
        max-width: 8.5in;
        margin: 0;
        padding: 2.5rem 1.5rem 0.5rem 1.5rem;
    }
}

/* CORRECTED CSS FOR PERSONAL DETAILS GRID */
#preview-personal-details-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    align-items: baseline;
}
.personal-detail-row b {
    white-space: nowrap;
    padding-right: 0.5rem;
}
