/**
 * Blood Donor Certificate Generator - Frontend Styles
 * Pixel-perfect design matching reference image
 * ID Card Size: 85.6mm × 54mm (Standard PVC Card - but vertical layout)
 */

/* Reset and Base */
.bdc-container {
    font-family: 'Poppins', sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.bdc-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========================================
   FORM SECTION
   ======================================== */

.bdc-form-section {
    max-width: 500px;
    margin: 0 auto;
    background: #012018;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bdc-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a5276;
    text-align: center;
    margin-bottom: 30px;
}

.bdc-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bdc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bdc-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF ;
}

.bdc-form-group input[type="text"],
.bdc-form-group input[type="tel"],
.bdc-form-group select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
    background: #FFFFFF ;
}

.bdc-form-group input:focus,
.bdc-form-group select:focus {
    outline: none;
    border-color: #1a5276;
}

.bdc-photo-upload {
    position: relative;
    width: 140px;
    height: 170px;
}

.bdc-photo-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.bdc-photo-preview {
    width: 140px;
    height: 170px;
    border: 2px dashed #1a5276;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bdc-photo-preview:hover {
    background: #e8f4f8;
    border-color: #c41e3a;
}

.bdc-photo-preview span {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 10px;
}

.bdc-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bdc-submit-btn {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Poppins', sans-serif;
    margin-top: 10px;
}

.bdc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.bdc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   PREVIEW SECTION
   ======================================== */

.bdc-preview-section {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.bdc-preview-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a5276;
    margin-bottom: 20px;
}

/* ========================================
   ID CARD - EXACT DESIGN MATCH
   Card dimensions based on reference image aspect ratio
   Width: 85.6mm, Height: ~152mm (vertical certificate)
   ======================================== */

.bdc-card-wrapper {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 12px;
    margin-bottom: 30px;
}

.bdc-id-card {
    width: 85.6mm;
    min-height: 152mm;
    height: auto;
    position: relative;
    overflow: visible;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: #FFFFFF !important;
    display: flex;
    flex-direction: column;
}


/* Heart Line Decoration */
.bdc-heart-line {
    position: relative;
    width: 100%;
    height: 10mm;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin-top: 2mm;
    background: #FFFFFF !important;
}

.bdc-heartbeat-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(15%) sepia(95%) saturate(6000%) hue-rotate(358deg) brightness(95%) contrast(115%);
}

/* ========================================
   HEADER WITH LOGOS
   ======================================== */

.bdc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 3mm 3mm 2mm 3mm;
    position: relative;
    z-index: 2;
    background: #FF671F !important;
}

.bdc-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bdc-logo-left {
    width: 18mm;
}

.bdc-logo-left img {
    width: 100%;
    height: auto;
    max-height: 18mm;
    object-fit: contain;
}

.bdc-logo-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bdc-logo-center img {
    width: 28mm;
    height: auto;
    max-height: 38mm;
    object-fit: contain;
}

.bdc-companionship-text {
    font-size: 2.8mm;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.2mm;
    margin-top: 0.5mm;
}

.bdc-tagline {
    display: flex;
    align-items: center;
    gap: 1mm;
    font-size: 1.8mm;
    color: #1565c0;
    font-style: italic;
}

.bdc-tagline img {
    width: 4mm;
    height: 2.5mm;
    object-fit: contain;
}

.bdc-logo-right {
    width: 18mm;
}

.bdc-logo-right img {
    width: 100%;
    height: auto;
    max-height: 18mm;
    object-fit: contain;
}

/* ========================================
   MAIN MESSAGE
   ======================================== */

.bdc-card-message {
    text-align: center;
    padding: 2mm 3mm;
    position: relative;
    z-index: 2;
    background: #FFFFFF !important;
}

.bdc-msg-line1 {
    font-size: 3.2mm;
    font-weight: 600;
    color: #0d47a1;
    margin-bottom: 1mm;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3mm;
    line-height: 1.3;
    word-spacing: 0.3mm;
}

.bdc-msg-line2 {
    font-size: 4.8mm;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.3mm;
    text-transform: uppercase;
    line-height: 1.2;
    word-spacing: 0.5mm;
}

/* ========================================
   PHOTO AND BLOOD DROPS SECTION
   ======================================== */

.bdc-card-content {
    position: relative;
    padding: 4mm 3mm;
    display: flex;
    justify-content: center;
    z-index: 2;
    flex: 1;
    background: #FFFFFF !important;
    min-height: 65mm;
    overflow: visible;
}

.bdc-photo-frame {
    width: 42mm;
    height: 50mm;
    background: #b3e5fc;
    border: 1.5mm solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.bdc-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Blood Drops */
.bdc-blood-drops {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 24mm;
    overflow: visible;
}

.bdc-drop {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bdc-drop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bdc-drop-1 {
    top: -3mm;
    right: 14mm;
    width: 4mm;
    height: 6mm;
}

.bdc-drop-2 {
    top: 8mm;
    right: 4mm;
    width: 9mm;
    height: 13mm;
}

.bdc-drop-3 {
    top: 24mm;
    right: 2mm;
    width: 13mm;
    height: 18mm;
}

.bdc-drop-4 {
    top: 42mm;
    right: 1mm;
    width: 18mm;
    height: 25mm;
    z-index: 1;
}

.bdc-plus {
    position: absolute;
    color: #fff;
    font-size: 4mm;
    font-weight: 700;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.bdc-plus-lg {
    font-size: 6mm;
}

/* ========================================
   USER INFO SECTION
   ======================================== */

.bdc-card-user {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4mm 3mm 3mm 3mm;
    gap: 2mm;
    position: relative;
    z-index: 2;
}

.bdc-user-drop {
    width: 5mm;
    height: 7mm;
}

.bdc-user-drop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bdc-user-text {
    text-align: center;
}

.bdc-user-name {
    font-size: 5.5mm;
    font-weight: 800;
    color: #012018;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.5mm;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    line-height: 1.1;
    background: rgba(255,255,255,0.9);
    padding: 1mm 2mm;
    border-radius: 2mm;
    border: 1px solid #ddd;
}

.bdc-user-business {
    font-size: 3.5mm;
    color: #012018;
    font-weight: 600;
    margin-top: 1mm;
    line-height: 1.2;
    background: rgba(255,255,255,0.9);
    padding: 0.5mm 1.5mm;
    border-radius: 1.5mm;
    border: 1px solid #ddd;
}

/* ========================================
   CALL TO ACTION
   ======================================== */

.bdc-card-cta {
    background: #43a047 !important;
    padding: 4mm 2mm;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2mm;
    flex-shrink: 0;
}

.bdc-cta-drop {
    width: 4mm;
    height: 6mm;
}

.bdc-cta-drop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bdc-cta-text {
    text-align: center;
}

.bdc-cta-main {
    font-size: 4.8mm;
    font-weight: 800;
    color: #ffd700;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.5mm;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.bdc-cta-date {
    font-size: 2.8mm;
    color: #ffff;
    font-weight: 500;
    margin-top: 1mm;
}

/* ========================================
   FOOTER WITH LOCATIONS
   ======================================== */

.bdc-card-footer {
    display: flex;
    justify-content: space-between;
    background: #046A38 !important;
    padding: 2.5mm 1.5mm;
    position: relative;
    z-index: 2;
    margin-top: auto;
    flex-shrink: 0;
}

.bdc-loc {
    flex: 1;
    text-align: center;
    border-right: 0.3mm solid rgba(255, 255, 255, 0.4);
    padding: 0 1.5mm;
    font-size: 1.8mm;
    color: #FFFFFF;
    line-height: 1.5;
}

.bdc-loc:last-child {
    border-right: none;
}

.bdc-loc p {
    margin: 0.2mm 0;
    color: #ffff;
    word-spacing: 0.2mm;
}

.bdc-loc-title {
    font-weight: 700;
    font-size: 2mm;
    color: #ffff;
    margin-bottom: 0.5mm;
}

.bdc-loc-city {
    font-weight: 700;
    color: #ffeb3b !important;
    font-size: 2.1mm;
    margin: 0.5mm 0;
}

/* ========================================
   DOWNLOAD BUTTONS
   ======================================== */

.bdc-download-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.bdc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.bdc-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.bdc-btn-pdf {
    background: #c41e3a;
    color: #fff;
}

.bdc-btn-pdf:hover:not(:disabled) {
    background: #a01830;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.bdc-btn-png {
    background: #2e7d32;
    color: #fff;
}

.bdc-btn-png:hover:not(:disabled) {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.bdc-btn-jpg {
    background: #1a5276;
    color: #fff;
}

.bdc-btn-jpg:hover:not(:disabled) {
    background: #154360;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.4);
}

.bdc-back-btn {
    background: transparent;
    border: 2px solid #1a5276;
    color: #1a5276;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.bdc-back-btn:hover {
    background: #1a5276;
    color: #fff;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .bdc-container {
        padding: 10px;
    }
    
    .bdc-form-section {
        padding: 20px;
    }
    
    .bdc-card-wrapper {
        padding: 10px;
    }
    
    .bdc-download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .bdc-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .bdc-form-section,
    .bdc-download-buttons,
    .bdc-back-btn,
    .bdc-preview-title {
        display: none !important;
    }
    
    .bdc-card-wrapper {
        background: none;
        padding: 0;
        margin: 0;
    }
    
    .bdc-id-card {
        box-shadow: none;
    }
}
