/* Resume Builder Preview — A4-mimicking styles */

/* Preview container */
.rb-preview-wrap {
    position: sticky;
    top: 0;
    height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.rb-preview-disclaimer {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 0.5rem 0;
}

/* A4 page simulation */
.rbp-page {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem 1.75rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 9.5px;
    line-height: 1.45;
    /* A4 aspect ratio: 210/297 = 0.707 */
    aspect-ratio: 210 / 297;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

/* Scale up on wider preview columns */
@media (min-width: 1400px) {
    .rbp-page {
        max-width: 320px;
        font-size: 10px;
    }
}

/* Header */
.rbp-header {
    text-align: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1.5px solid #2563eb;
}

.rbp-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.2rem;
    letter-spacing: -0.01em;
}

.rbp-contact {
    font-size: 8.5px;
    color: #4a4a4a;
    margin: 0;
}

.rbp-links {
    font-size: 7.5px;
    color: #2563eb;
    margin: 0.15rem 0 0;
}

/* Sections */
.rbp-section {
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
    border-left: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.rbp-section.rbp-active {
    border-left-color: #2563eb;
}

.rbp-section-title {
    font-size: 10px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.3rem;
    padding-bottom: 0.15rem;
    border-bottom: 0.5px solid #d4d4d4;
}

/* Entries */
.rbp-entry {
    margin-bottom: 0.4rem;
}

.rbp-entry-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.rbp-entry-line strong {
    font-size: 9.5px;
    font-weight: 600;
}

.rbp-dates {
    font-size: 8px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

.rbp-entry-sub {
    font-size: 9px;
    color: #4a4a4a;
    font-style: italic;
}

.rbp-entry-detail {
    font-size: 8px;
    color: #666;
}

.rbp-entry-desc {
    font-size: 8.5px;
    color: #333;
    margin: 0.15rem 0 0;
}

/* Bullets */
.rbp-bullets {
    margin: 0.15rem 0 0;
    padding-left: 1rem;
    list-style: disc;
}

.rbp-bullets li {
    font-size: 8.5px;
    color: #333;
    margin-bottom: 0.1rem;
}

/* Skills */
.rbp-skills {
    font-size: 9px;
    color: #333;
    margin: 0;
}

/* Lists */
.rbp-list {
    margin: 0;
    padding-left: 1rem;
    list-style: disc;
}

.rbp-list li {
    font-size: 8.5px;
    color: #333;
    margin-bottom: 0.1rem;
}

/* Link style */
.rbp-link {
    color: #2563eb;
    font-size: 7.5px;
}

/* Summary */
.rbp-summary {
    font-size: 9px;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

/* Empty state */
.rbp-empty {
    text-align: center;
    color: #999;
    font-size: 11px;
    padding: 2rem;
}

/* Mobile preview overlay */
.rb-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.rb-preview-overlay .rbp-page {
    max-width: 360px;
    font-size: 11px;
    touch-action: pinch-zoom;
}

.rb-preview-overlay-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 301;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Floating preview button (mobile) */
.rb-preview-fab {
    position: fixed;
    bottom: 70px; /* above mobile nav */
    right: 1rem;
    z-index: 99;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.15s;
}

.rb-preview-fab:active {
    transform: scale(0.9);
}
