
/* FORM UI ENHANCEMENTS */
.form-wrapper { 
    background: #ffffff; 
    padding: 30px; 
    border-radius: 15px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
    border: 1px solid #eee;
    margin-bottom: 40px;
}
.form-title { font-family: 'Cinzel', serif; color: #333; margin-bottom: 25px; border-left: 5px solid #d4af37; padding-left: 15px; }
.field input, .field textarea { 
    border: 1.5px solid #eaeaea; 
    transition: all 0.3s; 
    padding: 12px;
    background: #fafafa;
}
.field input:focus, .field textarea:focus { 
    border-color: #d4af37; 
    background: #fff; 
    outline: none; 
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2); 
}

/* SELECTED BUTTON UI */
.theme-btn, .tpl-btn { 
    position: relative;
    border: 2px solid transparent !important;
    transition: all 0.2s ease;
}
.theme-btn.active, .tpl-btn.active { 
    border-color: #2ecc71 !important; 
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.theme-btn.active::after, .tpl-btn.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #2ecc71;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BIODATA BOTTOM BORDER FIX */
#capture-area { padding: 20px; background: #333; display: flex; justify-content: center; }
.premium-card {
    /* width: 794px; height: 1123px; */
    width:794px;
    min-height:1123px; /* A4 minimum */
    height:auto;
    position: relative; padding: 60px; box-sizing: border-box; 
    box-shadow: 0 15px 50px rgba(0,0,0,0.8);
    margin-bottom: 20px; /* Ensures bottom isn't clipped by container */
}
.card-inner { border: 2px solid var(--theme-border); height: 100%; padding: 40px; box-sizing: border-box; display: flex; flex-direction: column; }

/* THEME DEFINITIONS & REST AS BEFORE */
.royal-velvet { background: #4a0404; color: #fff; --theme-border: #e2c08d; }
.ivory-gold { background: #fffdf5; color: #444; --theme-border: #b8860b; }
.deep-emerald { background: #064e3b; color: #fff; --theme-border: #a7f3d0; }
.champagne-glaze { background: #f7e7ce; color: #5d4037; --theme-border: #8d6e63; }
.traditional-gold { background: #5c3a1e; color: #fff; --theme-border: #d4af37; }
.royal-white { background: #fffdf5; color: #444; --theme-border: #b8860b; }
.classic-red { background: #7d0606; color: #fff; --theme-border: #f1c40f; }
.modern-green { background: #1b4332; color: #fff; --theme-border: #95d5b2; }
.royal-blue { background: #001d3d; color: #fff; --theme-border: #ffd60a; }
.sunset-orange { background: #e67e22; color: #fff; --theme-border: #fff; }
.pink-rose { background: #fff0f3; color: #c9184a; --theme-border: #ff4d6d; }
.luxury-dark { background: #1a1a1a; color: #e0e0e0; --theme-border: #d4af37; }

/* REUSABLE STYLES */
.info-row { display: flex; margin-bottom: 12px; font-size: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 4px;}
.info-row label { width: 130px; font-weight: 300; flex-shrink: 0; }
.header-symbol { text-align: center; font-family: 'Cinzel', serif; font-size: 24px; color: var(--theme-border); margin-bottom: 30px; }
.section-head { color: var(--theme-border); border-bottom: 1px solid var(--theme-border); padding-bottom: 5px; margin: 25px 0 15px; text-transform: uppercase; font-size: 18px; }
.footer-blessing { margin-top: auto; text-align: center; font-family: 'Great Vibes', cursive; font-size: 22px; color: var(--theme-border); padding-top: 20px; }
.frame { width: 200px; height: 250px; border: 3px solid var(--theme-border); border-radius: 15px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: none; }
.content-row { display: flex; gap: 30px; }
.details-col { flex: 1; }
.multi-line { font-size: 15px; line-height: 1.6; white-space: pre-line; }
.ornament { position: absolute; width: 120px; height: 120px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0 0 Q 50 0 50 50 Q 0 50 0 0 M20 20 Q 50 20 50 50 M20 20 Q 20 50 50 50' fill='none' stroke='%23d4af37' stroke-width='2'/%3E%3C/svg%3E") no-repeat; background-size: contain; z-index: 2; }
.corner-tl { top: 20px; left: 20px; }
.corner-tr { top: 20px; right: 20px; transform: rotate(90deg); }
.corner-bl { bottom: 20px; left: 20px; transform: rotate(-90deg); }
.corner-br { bottom: 20px; right: 20px; transform: rotate(180deg); }

/* TEMPLATES */
.tpl-modern .content-row { flex-direction: row-reverse; }
.tpl-modern .card-inner { border: none; border-left: 15px solid var(--theme-border); }
.tpl-elegant .ornament { display: none; }
.tpl-elegant .card-inner { border: 1px solid #ccc; }
.tpl-ornate .card-inner { outline: 10px double var(--theme-border); outline-offset: -20px; }

.action-buttons { display: flex; gap: 20px; justify-content: center; margin-top: 30px; padding-bottom: 50px; }
.btn { padding: 15px 35px; border: none; border-radius: 50px; color: #fff; font-weight: bold; cursor: pointer; }
.btn.pdf { background: #d32f2f; }
.btn.img { background: #388e3c; }

/* ===============================
   PAGE LAYOUT IMPROVEMENT
=================================*/

.premium-tool-container{
    max-width:1200px;
    margin:0 auto;
    padding:40px 20px 60px;
}

/* Add proper spacing between form & preview */
.form-wrapper{
    margin-bottom:50px;
}

/* Cleaner Section Headings */
.selector-group h3{
    font-size:18px;
    font-weight:700;
    margin-bottom:14px;
    color:#1f2937;
}

/* ===============================
   FORM GRID PROFESSIONAL LOOK
=================================*/

.tool-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
}

.field,
.form-group{
    display:flex;
    flex-direction:column;
}

.field.full{
    grid-column:1/-1;
}

.field label{
    font-size:13px;
    font-weight:600;
    margin-bottom:6px;
    color:#374151;
}

/* Cleaner Inputs */
.field input,
.field textarea{
    border-radius:12px;
    font-size:14px;
}

.field textarea{
    min-height:90px;
    resize:vertical;
}

/* File Upload Professional Look */
input[type="file"]{
    border:1px dashed #d1d5db;
    background:#f9fafb;
    padding:14px;
    cursor:pointer;
}

/* ===============================
   THEME BUTTON GRID IMPROVEMENT
=================================*/

.theme-selector{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:12px;
}

/* Theme Button Base */
.theme-btn,
.tpl-btn{
    padding:12px 14px;
    border-radius:10px;
    font-weight:600;
    font-size:14px;
    cursor:pointer;
    background:#f8fafc;
    border:1px solid #e5e7eb !important;
}

/* Hover Effect */
.theme-btn:hover,
.tpl-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 6px 14px rgba(0,0,0,0.08);
}

/* Active State (keep your logic intact) */
.theme-btn.active,
.tpl-btn.active{
    border-color:#10b981 !important;
}

/* ===============================
   PREVIEW SECTION POLISH
=================================*/

.preview-scroll{
    background:#111827;
    padding:40px 20px;
    border-radius:20px;
    box-shadow:0 12px 30px rgba(0,0,0,0.2);
}

/* Make preview centered nicely */
#capture-area{
    padding:20px;
    background:transparent;
}

/* Add smooth shadow to biodata card */
.premium-card{
    border-radius:14px;
    overflow:hidden;
}

/* Improve content spacing */
.card-inner{
    padding:50px 45px;
}

/* Cleaner info rows */
.info-row{
    font-size:14px;
}

.info-row label{
    font-weight:500;
    opacity:.85;
}

/* ===============================
   PHOTO SECTION POLISH
=================================*/

.photo-col{
    display:flex;
    justify-content:center;
}

.frame{
    box-shadow:0 10px 20px rgba(0,0,0,0.15);
    /* background:#fff; */
}

#placeholderText{
    font-size:13px;
    letter-spacing:1px;
    color:#999;
}

/* ===============================
   ACTION BUTTONS PROFESSIONAL
=================================*/

.action-buttons{
    margin-top:40px;
}

.btn{
    min-width:200px;
    font-size:15px;
    letter-spacing:.4px;
    transition:.2s ease;
}

.btn:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 18px rgba(0,0,0,0.15);
}

.btn.pdf{
    background:linear-gradient(135deg,#dc2626,#b91c1c);
}

.btn.img{
    background:linear-gradient(135deg,#059669,#047857);
}

/* ===============================
   RESPONSIVE PROFESSIONAL
=================================*/

@media(max-width:900px){

.content-row{
    flex-direction:column;
}

.photo-col{
    margin-top:30px;
}

.preview-scroll{
    padding:20px 10px;
}

/* Responsive A4 card */
#biodata{
    width:100%;
    max-width:100%;
    min-height:auto;
    padding:30px 20px;
}

/* Remove fixed A4 size on mobile */
.premium-card{
    width:100%;
    min-height:auto;
}

.card-inner{
    padding:30px 20px;
}

.action-buttons{
    flex-direction:column;
    align-items:center;
}

}

/* ===============================
   SMOOTH TRANSITIONS
=================================*/

.premium-card,
.theme-btn,
.tpl-btn,
.btn{
    transition:all .25s ease;
}



