:root {
    --bg-dark: #0B1320;
    --card-bg: rgba(22, 30, 46, 0.8);
    --accent-primary: #FF6600; /* EuroPrint Orange */
    --accent-secondary: #2E3569; /* EuroPrint Blue */
    --text-primary: #FEFEFE;
    --text-secondary: #94A3B8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-color: rgba(255, 102, 0, 0.15);
    --font-heading: 'Sora', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem;
}

/* Optimize for Iframe */
body.in-iframe {
    padding: 0;
}

.bg-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
}

.container {
    width: 100%;
    max-width: 1000px;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-area {
    margin-bottom: 1rem;
}

.main-logo {
    max-width: 140px;
    height: auto;
}

h1, h2, .result-circle span {
    font-family: var(--font-heading);
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

/* Grids and Layout */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 850px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

.results-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards */
.card {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    padding-left: 0.75rem;
}

.section-title i {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

h2 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inputs */
.input-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 500;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"],
input[type="time"],
input[type="text"],
select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #1e293b;
}

.prefix {
    position: absolute;
    left: 0.9rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.input-wrapper input[id$="price"], 
.input-wrapper input#extra-costs {
    padding-left: 2.2rem;
}

.suffix {
    position: absolute;
    right: 0.9rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* Range Sliders */
input[type="range"] {
    width: 100%;
    accent-color: var(--accent-primary);
    margin-bottom: 0.25rem;
    height: 6px;
}

.range-val {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 700;
}

/* Result Card */
.main-result-card {
    background: radial-gradient(circle at top right, rgba(255, 102, 0, 0.1), transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.result-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: inset 0 0 20px rgba(255, 102, 0, 0.1);
}

.result-circle span {
    font-size: 1.6rem;
    font-weight: 800;
}

.result-circle label {
    margin-bottom: 0;
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 700;
}

.detailed-results {
    width: 100%;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.result-item.highlight {
    border-bottom: none;
    margin-top: 0.5rem;
    background: rgba(255, 102, 0, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
}

.result-item.highlight strong {
    color: var(--accent-primary);
    font-size: 1.05rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 0.85rem;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--accent-secondary);
}

.btn-secondary:hover {
    background: var(--accent-secondary);
}

/* Budget Section */
.budget-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1.25rem;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .budget-form {
        grid-template-columns: 1fr;
    }
}

/* Quote Cart Section */
.quote-cart-section {
    margin-top: 1.5rem;
}

.quote-items-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-height: 80px;
}

.empty-cart-msg {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
    font-style: italic;
    padding: 1rem;
}

.quote-item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    position: relative;
}

.quote-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    background: #1e293b;
    flex-shrink: 0;
}

.quote-item-details {
    flex-grow: 1;
}

.quote-item-details h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.quote-item-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.quote-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    white-space: nowrap;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-remove-item:hover {
    opacity: 1;
}

.quote-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: rgba(255, 102, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 102, 0, 0.2);
    margin-bottom: 1.5rem;
}

.quote-grand-total span {
    font-size: 1rem;
    font-weight: 600;
}

.quote-grand-total strong {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.action-buttons {
    display: flex;
    flex-direction: column;
}

/* PDF Template Styling (Professional A4 Layout) */
.pdf-blueprint {
    /* Set fixed A4 width dynamically for html2pdf rendering */
    width: 800px; 
    background-color: #ffffff;
    color: #333333;
    font-family: 'Poppins', sans-serif;
    padding: 40px;
    box-sizing: border-box;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2E3569; /* EuroPrint Blue */
    padding: 30px;
    border-radius: 8px 8px 0 0;
    color: #ffffff;
    margin-bottom: 30px;
}

.pdf-logo {
    max-width: 200px;
}

.pdf-company-info {
    text-align: right;
}

.pdf-company-info h2 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #ffffff;
    letter-spacing: normal;
}

.pdf-company-info p {
    font-size: 11px;
    margin: 2px 0;
    color: #e2e8f0;
}

.pdf-title-banner {
    border-bottom: 3px solid #FF6600; /* EuroPrint Orange */
    padding-bottom: 15px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.pdf-title-banner h1 {
    font-size: 24px;
    color: #2E3569;
    margin: 0;
}

.pdf-date {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.pdf-client-info {
    display: flex;
    gap: 30px;
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.pdf-info-box strong {
    color: #2E3569;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.pdf-info-box span {
    font-size: 14px;
    color: #334155;
}

.pdf-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.pdf-items-table th {
    background-color: #2E3569;
    color: #ffffff;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
}

.pdf-items-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.pdf-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.pdf-item-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
    margin-bottom: 4px;
}

.pdf-item-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.pdf-item-price {
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
}

.pdf-totals-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

.pdf-grand-total {
    background: #fff7ed;
    border: 2px solid #FF6600;
    padding: 15px 30px;
    border-radius: 8px;
    text-align: right;
}

.pdf-grand-total span {
    display: block;
    font-size: 12px;
    color: #FF6600;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.pdf-grand-total strong {
    font-size: 24px;
    color: #0f172a;
}

.pdf-footer {
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.pdf-footer p {
    font-size: 10px;
    color: #94a3b8;
    margin: 3px 0;
}
