/* KalPrakash PhotoCard FINAL PRO CSS v21.0 */

@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');
@import url('https://fonts.maateen.me/kalpurush/font.css');
@import url('https://fonts.cdnfonts.com/css/ekush');
@import url('https://cdn.jsdelivr.net/gh/mhs/bangla-web-fonts@master/css/ekush.css');

@font-face {
    font-family: 'Ekush';
    src: url('https://cdn.jsdelivr.net/gh/mhs/bangla-web-fonts@master/fonts/Ekush/Ekush.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --kp-red: #cb2027;
    --kp-navy: #1f3f5b;
    --kp-border: #e0e0e0;
}

body {
    font-family: 'Hind Siliguri', sans-serif;
}

/* =========================================================
   CIRCULAR ICON BUTTON (HOVER EFFECT REMOVED AS REQUESTED)
========================================================= */
.kp-circle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background-color: var(--kp-red) !important; /* #cb2027 */
    color: #ffffff !important;
    text-decoration: none !important;
    margin: 0 4px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
    overflow: hidden !important;
    transform: none !important;
}

/* Neutralize any hover, focus or active animations/scaling from theme */
.kp-circle-btn:hover,
.kp-circle-btn:focus,
.kp-circle-btn:active {
    background-color: var(--kp-red) !important;
    transform: none !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
    text-decoration: none !important;
}

/* Ensure Google Material Symbols Outlined renders as Icon and never breaks into text */
.kp-circle-btn .material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-size: 22px !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    font-feature-settings: 'liga' !important;
    -webkit-font-feature-settings: 'liga' !important;
    -webkit-font-smoothing: antialiased !important;
    color: #ffffff !important;
}

/* Modal Styling */
.kp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}
.kp-modal-content {
    background: #fff;
    width: 100%;
    max-width: 1050px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    animation: kpZoomIn 0.3s ease;
}
@keyframes kpZoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.kp-modal-header {
    background: #111;
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kp-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #fff;
    font-family: 'Hind Siliguri', sans-serif;
}
.kp-close {
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}
.kp-close:hover {
    color: #fff;
}

/* Editor Grid Layout */
.kp-editor-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    min-height: 560px;
}
@media (max-width: 880px) {
    .kp-editor-grid {
        grid-template-columns: 1fr;
    }
}

/* Preview Section */
.kp-preview-section {
    padding: 25px;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--kp-border);
    overflow: hidden;
}

/* Scale Wrapper: Scales down the 1080x1080 card to fit smoothly on any screen */
.kp-scale-wrapper {
    width: 500px;
    height: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
@media (max-width: 600px) {
    .kp-scale-wrapper {
        width: 330px;
        height: 330px;
    }
}

/* =========================================================
   THE EXACT 1080x1080 PHOTOCARD (From Your Plugin)
========================================================= */
.kp-card {
    width: 1080px;
    height: 1080px;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    transform: scale(0.4629); /* 500px / 1080px = 0.4629 */
    background: #fff;
    overflow: hidden;
}
@media (max-width: 600px) {
    .kp-card {
        transform: scale(0.3055); /* 330px / 1080px = 0.3055 */
    }
}

/* IMAGE */
.kp-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 63%;
    object-fit: cover;
    z-index: 1;
}

/* TEMPLATE OVERLAY */
.kp-template {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* DATE - Kalpurush Font */
.kp-date {
    position: absolute;
    top: 608px;
    left: 218px;
    width: 680px;
    font-family: 'Kalpurush', 'SolaimanLipi', sans-serif;
    font-size: 35px;
    font-weight: 400;
    text-align: left;
    color: #000;
    z-index: 3;
}

/* TITLE - Ekush Font */
.kp-title {
    position: absolute;
    top: 700px;
    width: 86%;
    left: 7%;
    text-align: center;
    font-family: 'Ekush', 'Kalpurush', sans-serif;
    font-size: 64px;
    font-weight: 400;
    line-height: 1.25;
    color: #1f3f5b;
    z-index: 3;
    word-wrap: break-word;
}

/* Sidebar Customizer Controls */
.kp-controls-sidebar {
    padding: 25px 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.kp-controls-sidebar h4 {
    margin: 0 0 20px 0;
    font-size: 17px;
    color: #222;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}
.control-group {
    margin-bottom: 15px;
}
.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}
.control-group input[type="range"] {
    width: 100%;
    cursor: pointer;
}
.control-group input[type="text"],
.control-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    color: #222;
}
.control-group textarea {
    resize: vertical;
}

/* Action Buttons */
.kp-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.kp-btn-primary {
    background: #111;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Hind Siliguri', sans-serif;
    transition: background 0.3s;
    width: 100%;
}
.kp-btn-primary:hover {
    background: var(--kp-red);
}
.kp-btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Hind Siliguri', sans-serif;
    transition: background 0.2s;
    width: 100%;
}
.kp-btn-secondary:hover {
    background: #e1e1e1;
}
