/* ================================
   Noto Serif Bengali (Local)
================================= */
@font-face {
    font-family: 'NotoSerifBn';
    src: url('/wp-content/plugins/times-photo-card/assets/fonts/noto-serif-bengali-v31-bengali-800.woff2') format('woff2');
    font-weight: 800;
    font-style: black;
    font-display: block; /* Already correct */
}

@font-face {
    font-family: 'NotoSerifBn';
    src: url('/wp-content/plugins/times-photo-card/assets/fonts/noto-serif-bengali-v31-bengali-900.woff2') format('woff2');
    font-weight: 900;
    font-style: black;
    font-display: block; /* FIXED: Changed from 'swap' to 'block' */
}

/* Apply font inside card */
#tpc-card,
#tpc-card * {
    font-family: 'NotoSerifBn', serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ================================
   Base Card Layout
================================= */
#tpc-card {
    position: relative;
    width: 1600px;
    height: 2000px;
    margin: 0 auto;
    display: inline-block;
    transform-origin: top center;
}

#tpc-bg {
    position: absolute;
    width: 1600px;
    height: 2000px;
    top: 0;
    left: 0;
    z-index: 3;
    object-fit: cover;
}

/* Photo */
.tpc-photo-wrap {
    position: absolute;
    top: 480px;
    left: 110px;
    width: 1380px;
    height: 840px;
    overflow: hidden;
    border-radius: 35px;
    z-index: 1;
}

#tpc-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}


/* ================================
   Title
================================= */
.tpc-title {
    position: absolute;
    top: 160px;
    left: 90px;
    right: 90px;
    font-size: 100px;
    font-weight: 900;
    line-height: 1.40;
    text-align: center;
    color: #fff;
    z-index: 4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ================================
   Responsive Preview (scaled)
================================= */
#tpc-preview {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    text-align: center;
}

@media (max-width: 1400px) {
    #tpc-card { transform: scale(0.85); }
}

@media (max-width: 1024px) {
    #tpc-card { transform: scale(0.65); }
}

@media (max-width: 768px) {
    #tpc-card { transform: scale(0.48); }
}

@media (max-width: 480px) {
    #tpc-card { transform: scale(0.40); }
}


/* ================================
   Buttons (Jarida-style)
================================= */
#tpc-wrapper .tpc-form {
    margin-bottom: 20px;
}

#tpc-wrapper .tpc-form button {
    padding: 10px 28px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.14);
    margin-right: 8px;
}

#tpc-generate {
    background: #c0392b;
    color: #fff;
}

#tpc-download {
    background: #555;
    color: #fff;
}

#tpc-wrapper .tpc-form button:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.22);
    transform: translateY(-1px);
}


/* ================================
   Fix Theme Interference
================================= */
#tpc-wrapper {
    position: relative;
    z-index: 999999;
}