/* ===========================
   WRAPPER
=========================== */
.rb-builder-wrapper {
    display: flex;
    height: 90vh;
    margin: 20px auto;
    max-width: 1600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

/* ===========================
   LEFT PANEL
=========================== */
.rb-left-panel {
    width: 40%;
    background: #111827;
    color: #ffffff;
    padding: 30px;
    overflow-y: auto;
}

/* Scoped section headers (h3) */
.rb-left-panel .rb-resume-settings h3,
.rb-left-panel .rb-user-data-form h3,
.rb-left-panel .rb-template-selection h3 {
    font-size: 18px !important;
    color: #ffffff !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    padding-bottom: 8px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
}

/* Labels */
.rb-left-panel label {
    display: block;
    font-weight: bold;
    color: #e5e7eb;
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 14px;
}

/* Inputs, textareas, selects */
.rb-left-panel input,
.rb-left-panel textarea,
.rb-left-panel select {
    width: 100% !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    border-radius: 6px !important;
    border: none !important;
    font-size: 14px !important;
    background: #1f2937 !important;
    color: #ffffff !important;
}

/* Focus state */
.rb-left-panel input:focus,
.rb-left-panel textarea:focus,
.rb-left-panel select:focus {
    outline: 2px solid #6366f1 !important;
    background: #1f2937 !important;
}

/* Color picker */
.rb-left-panel input[type="color"] {
    width: 100% !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
}

/* Textarea */
.rb-left-panel textarea {
    min-height: 80px !important;
    resize: vertical;
}

/* ===========================
   TEMPLATE GRID
=========================== */
.rb-left-panel .rb-templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.rb-left-panel .rb-template-option {
    background: #1f2937;
    border-radius: 6px;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.rb-left-panel .rb-template-option:hover {
    background: #374151;
}

.rb-left-panel .rb-template-option img {
    width: 100%;
    border-radius: 4px;
}

/* Upgrade note for free users */
.rb-left-panel .rb-upgrade-note {
    margin-top: 10px;
    font-size: 12px;
    color: #f59e0b;
    font-style: italic;
}

/* ===========================
   SAVE BUTTONS
=========================== */
.rb-left-panel .rb-save-button {
    margin-top: 30px;
}

.rb-left-panel .rb-save-button button {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.rb-left-panel #rb_save_resume {
    background: #6366f1;
    color: #ffffff;
}

.rb-left-panel #rb_download_pdf {
    background: #10b981;
    color: #ffffff;
}

.rb-left-panel #rb_download_word {
    background: #f59e0b;
    color: #ffffff;
}

.rb-left-panel .rb-save-button button:hover {
    opacity: 0.9;
}

/* ===========================
   RIGHT PANEL
=========================== */
.rb-right-panel {
    width: 60%;
    background: #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px;
}

/* A4 preview styling */
.rb-right-panel .rb-preview {
    background: #ffffff;
    width: 794px;
    min-height: 1123px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    border-radius: 8px;
    transform: scale(0.9);
    transform-origin: top center;
}

/* Scrollbar for left panel */
.rb-left-panel::-webkit-scrollbar {
    width: 6px;
}

.rb-left-panel::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

.rb-upgrade-box {
    margin-top: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    text-align: center;
}

.rb-upgrade-note {
    margin-bottom: 15px;
    font-size: 14px;
    color: #ffffff;
}

.rb-upgrade-button-wrapper {
    display: flex;
    justify-content: center;
}

.rb-upgrade-button {
    display: inline-block;
    padding: 10px 22px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: #ffffff;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rb-upgrade-button:hover {
    background: linear-gradient(135deg, #224abe, #1b3a9b);
    transform: translateY(-2px);
}

.rb-template-selection-page {
    max-width:1200px;
    margin:40px auto;
    text-align:center;
}

.rb-templates-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
    gap:30px;
    margin-top:30px;
}

.rb-template-card {
    background:#fff;
    padding:15px;
    border-radius:10px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

.rb-template-card img {
    width:100%;
    border-radius:6px;
}

.rb-template-actions {
    margin-top:15px;
    display:flex;
    justify-content:space-between;
    gap:10px;
}

.rb-select-btn,
.rb-preview-btn {
    flex:1;
    padding:10px;
    border-radius:6px;
    text-decoration:none;
    font-weight:600;
    text-align:center;
}

.rb-select-btn {
    background:#4e73df;
    color:#fff;
}

.rb-preview-btn {
    background:#f8f9fc;
    border:1px solid #ddd;
    color:#333;
}
