/* =========================================================
   S.S. Yantra Generator - Modern Responsive UI
   ========================================================= */

:root {

    --primary-color: #8b0000;
    --primary-hover: #6f0000;

    --secondary-color: #f7f7f7;
    --background-color: #f3f5f9;

    --card-background: #ffffff;

    --text-color: #1f2937;
    --light-text: #6b7280;

    --border-color: #e5e7eb;

    --success-color: #15803d;
    --error-color: #b91c1c;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --transition-speed: 0.25s ease;

    --container-width: 1240px;

    --font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

/* =========================================================
   Reset
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    font-family: var(--font-family);

    background: var(--background-color);

    color: var(--text-color);

    line-height: 1.5;

    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
    border: none;
}

/* =========================================================
   Topbar
   ========================================================= */

.topbar {

    position: sticky;
    top: 0;

    z-index: 999;

    background: #ffffff;

    border-bottom: 1px solid var(--border-color);

    backdrop-filter: blur(10px);

    box-shadow: var(--shadow-sm);
}

.topbar-wrapper {

    max-width: var(--container-width);

    margin: auto;

    padding: 14px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    flex-wrap: wrap;
}

.brand-area {

    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-color);

    color: #ffffff;

    border-radius: 50%;

    font-weight: 700;

    font-size: 18px;

    box-shadow: var(--shadow-sm);
}

.brand-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {

    font-size: 22px;

    font-weight: 700;

    color: var(--text-color);
}

.brand-subtitle {

    color: var(--light-text);

    font-size: 14px;
}

/* =========================================================
   Navbar
   ========================================================= */

.menu-toggle{

    display:none;

    width:44px;

    height:44px;

    border:none;

    border-radius:8px;

    background:#8b0000;

    color:#ffffff;

    font-size:24px;

    cursor:pointer;
}

.navbar {

    display: flex;
    align-items: center;
    gap: 16px;

    flex-wrap: wrap;
}

.navbar a {

    text-decoration: none;

    color: var(--text-color);

    font-size: 15px;

    font-weight: 600;

    transition: var(--transition-speed);

    position: relative;
}

.navbar a:hover {
    color: var(--primary-color);
}

.navbar a::after {

    content: "";

    position: absolute;

    left: 0;
    bottom: -5px;

    width: 0;
    height: 2px;

    background: var(--primary-color);

    transition: var(--transition-speed);
}

.navbar a:hover::after {
    width: 100%;
}

.menu-overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,0.35);

    opacity:0;

    visibility:hidden;

    transition:0.3s ease;

    /*z-index:1000;*/
}

.menu-overlay.active{

    opacity:1;

    visibility:visible;
}

/* =========================================================
   Main Layout
   ========================================================= */

.page-wrapper {

    padding: 32px 20px 50px;
}

.main-layout{

    max-width:1200px;

    margin:auto;

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:24px;

    align-items:stretch;
}

.info-card{
    grid-column:1 / -1;
    background:#ffa;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:16px;
    box-shadow:0 4px 14px rgba(0,0,0,0.05);
}

.info-card-content h2{
    font-size:28px;
    margin-bottom:14px;
    color:#c00;
}

.info-card-content p{
    font-size:16px;
	font-weight:500;
    line-height:1.7;
    color:#900;
    margin-bottom:10px;
}

.disclaimer {
	font-size:small!important;
	float:right;
	color:#700!important;
}

/* =========================================================
   Cards
   ========================================================= */

.preview-card,
.form-card {
	height:100%;
	
    background: var(--card-background);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);

    border: 1px solid rgba(0, 0, 0, 0.04);

    overflow: hidden;
}

/* =========================================================
   Preview Section
   ========================================================= */

.preview-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 6px 24px;

    border-bottom: 1px solid var(--border-color);

    flex-wrap: wrap;
}

.preview-header h2 {

    font-size: 24px;

    margin-bottom: 5px;
}

.preview-header p {

    color: var(--light-text);

    font-size: 14px;
}

.preview-image-wrapper{

    width:100%;

    display:flex;

    justify-content:center;

    align-items:center;
}

.preview-image-wrapper img {

    width: 100%;
	
    max-width:500px;

    aspect-ratio:1 / 1;

    object-fit:contain;

    height:auto;

    display:block;

    border-radius: var(--radius-md);

    background: #f9f9f9;

    box-shadow: var(--shadow-sm);
}

.download-button {

    padding: 8px 12px;

    background: var(--success-color);

    color: #ffffff;

    border-radius: var(--radius-sm);

    font-size: 14px;

    font-weight: 700;

    transition: var(--transition-speed);
}

.download-button:hover {

    transform: translateY(-2px);

    opacity: 0.95;
}

.download-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #ccc;
  color: #444;
  pointer-events: none;
}

#loaderWrap{
	position:fixed;
	inset:0;
	background:rgba(0,0,0,.25);
	display:none;
	align-items:center;
	justify-content:center;
	z-index:99999;
}

#loaderWrap.active{
	display:flex;
}

#loader{
	width:120px;
	height:120px;
	border:8px solid #ff0;
	border-top-color:#c00;
	border-radius:50%;
	animation:spin .7s linear infinite;
	will-change:transform;
}

@keyframes spin{
	to{transform:rotate(360deg);}
}

/* =========================================================
   Form Card
   ========================================================= */

.form-card {
    padding: 26px;
}

.form-card-header {
    margin-bottom: 26px;
}

.form-card-header h2 {

    font-size: 28px;

    margin-bottom: 8px;
}

.form-card-header p {

    color: var(--light-text);

    font-size: 15px;
}

/* =========================================================
   Alerts
   ========================================================= */

.alert-box {

    padding: 14px 16px;

    border-radius: var(--radius-sm);

    margin-bottom: 18px;

    font-size: 14px;
	
	font-weight: bold;

    display: none;
}

.alert-error {

    background: rgba(185, 28, 28, 0.08);

    color: var(--error-color);

    border: 1px solid rgba(185, 28, 28, 0.15);
}

.alert-success {

    background: rgba(21, 128, 61, 0.08);

    color: var(--success-color);

    border: 1px solid rgba(21, 128, 61, 0.15);
}

/* =========================================================
   Form Elements
   ========================================================= */

.form-group {
    margin-bottom: 22px;
}

.field-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 10px;

    flex-wrap: wrap;
	
	min-width:0;
}

.field-header label{
    flex-shrink:0;
	flex:1 1 auto;
	min-width:220px;
}

.form-group label {

    font-size: 15px;

    font-weight: 600;

    color: var(--text-color);
}

.preview-badge {
    min-width:0;

    max-width:100%;

    overflow:hidden;

    white-space:nowrap;

    text-overflow:ellipsis;

    background: rgba(255, 196, 0, 0.15);

    color: #8a4b00;

    border-left: 4px solid #ffc400;

    padding: 8px 12px;

    border-radius: var(--radius-sm);

    font-size: 13px;

    font-weight: 600;
	
	flex:0 0 auto;
}

input[type="text"],
input[type="tel"],
select {

    width: 100%;

    height: 52px;

    padding: 0 16px;

    border: 1px solid var(--border-color);

    border-radius: var(--radius-sm);

    background: #ffffff;

    font-size: 15px;

    transition: var(--transition-speed);
}

input[type="text"]:focus,
input[type="tel"]:focus,
select:focus {

    outline: none;

    border-color: var(--primary-color);

    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.08);
}

/* =========================================================
   Double Row
   ========================================================= */

.double-field-row {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 18px;
}

/* =========================================================
   Checkbox
   ========================================================= */

.checkbox-wrapper {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    margin-bottom: 12px;
}

.checkbox-wrapper input[type="checkbox"] {

    margin-top: 3px;

    width: 18px;
    height: 18px;

    accent-color: var(--primary-color);
}

.info-section{
	display: flex;
	justify-content: center;
    margin-top: 24px;
}

.info-section label, .checkbox-wrapper label {

    font-size: 14px;

    line-height: 1.5;

    color: var(--text-color);
}

/* =========================================================
   Price Section
   ========================================================= */

.price-section {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    flex-wrap: wrap;
}

.price-box {
	width:min(200px, 100%);

    display: flex;

    flex-wrap: wrap;

    gap: 12px;
	
	align-items: center;
}

.price-title {

    font-size: 16px;

    color: var(--light-text);

    text-transform: uppercase;

    letter-spacing: 0.5px;
	
	padding-left: 15px;
}

.price-value {

    font-size: 22px;

    font-weight: 700;

    color: var(--primary-color);
}

.price-note{

    font-size:14px;

    line-height:1.5;

    color:var(--light-text);

    margin-top:-8px;
}

.submit-button {

    min-width: 200px;

    height: 52px;

    padding: 0 22px;

    background: var(--primary-color);

    color: #ffffff;

    border-radius: var(--radius-sm);

    font-size: 15px;

    font-weight: 700;

    transition: var(--transition-speed);

    box-shadow: var(--shadow-sm);
}

.submit-button:hover {

    background: var(--primary-hover);

    transform: translateY(-2px);
}

.submit-button:disabled {

    opacity: 0.7;

    cursor: not-allowed;
}

#success-msg, #error-msg {
  scroll-margin-top: 95px;
}
/* =========================================================
   Responsive
   ========================================================= */


@media (max-width: 1100px) {

    .main-layout {
        grid-template-columns: 1fr;
    }

    .form-card {
        width: 100%;
    }
	
    #preview-image{

        width:100%;

        max-width:500px;
    }
}

@media (max-width: 768px) {

    html,
    body{

        width:100%;

        max-width:100%;

        overflow-x:hidden;
    }

    .topbar{

        width:100%;
    }

    .topbar-wrapper{

        width:100%;

        overflow:hidden;
    }

    .menu-toggle{

        display:flex;

        align-items:center;

        justify-content:center;

        z-index:1003;
    }

    .navbar{

        position:fixed;

        top:0;

        right:0;

        width:260px;

        max-width:82vw;

        height:100vh;

        background:#ffffff;

        box-shadow:-4px 0 20px rgba(0,0,0,0.12);

        padding:90px 20px 24px;

        z-index:1002;

        overflow-y:auto;
		
		isolation:isolate;

        transform:translateX(100%) translateZ(0);

        transition:transform 0.35s ease;

        display:block;
    }

    .navbar.active{

        transform:translateX(0) translateZ(0);
    }

    .navbar a{

        display:block;

        width:100%;

        padding:14px 0;

        border-bottom:1px solid #eeeeee;

        font-size:16px;

        text-decoration:none;
    }

    .menu-overlay{

        position:fixed;

        inset:0;

        background:rgba(0,0,0,0.35);

        opacity:0;

        visibility:hidden;

        transition:0.3s ease;

        /*z-index:1001;*/
    }

    .menu-overlay.active{

        opacity:1;

        visibility:visible;
    }
	
    .page-wrapper {
        padding: 20px 14px 40px;
    }

    .preview-header,
    .form-card {
        padding: 20px;
    }

    .preview-image-wrapper {
        padding: 20px;
    }

    .double-field-row {
        grid-template-columns: 1fr;
    }

    .brand-title {
        font-size: 20px;
    }

    .form-card-header h2 {
        font-size: 24px;
    }

    .preview-header h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {

    .brand-area {
        align-items: flex-start;
    }

    .brand-logo {

        width: 46px;
        height: 46px;

        font-size: 16px;
    }

    .navbar {
        gap: 12px;
    }

    .navbar a {
        font-size: 14px;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
	
	.field-header{
		flex-direction:column;
		align-items:flex-start;
	}

	.preview-badge{
		width:100%;
	}

    .download-button {
        width: 100%;
    }

	.price-title {
		padding-left: 0px;
	}

	.price-box {
		width: 100%;
	}

	.price-box {
		flex-wrap: nowrap;
	}
	
	.price-note{
		margin-top: 0px;
	}

    .price-section {
        flex-direction: column;
        align-items: stretch;
    }

    .submit-button {
        width: 100%;
    }

    input[type="text"],
    input[type="tel"],
    select,
    .submit-button {
        height: 50px;
    }

    .price-value {
        font-size: 24px;
    }
}