/* Bhāramāstra - Easy Ads Inspired Clean UI */
* {
    box-sizing: border-box;
}
.input-group {
    position: relative;
    overflow: visible !important;
}
.card.form-container, .tab-section, .content-area {
    overflow: visible !important;
}

body {
    font-family: 'Inter', 'Roboto', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
}

.main-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar - Fixed width on desktop, responsive on mobile */
.sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100vh;
    width: 280px;
    min-width: 280px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    padding: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.logo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 24px 24px 24px;
    font-size: 1.8rem;
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0;
    background: rgba(255,255,255,0.05);
}

.logo i {
    margin-right: 12px;
    font-size: 1.6rem;
}

.sidebar-nav {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 16px 0;
    margin-top: 0;
}

.sidebar-nav ul {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    width: 100%;
    margin-bottom: 4px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 28px;
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left: 4px solid rgba(255,255,255,0.5);
}

.sidebar-nav .nav-link.active, 
.sidebar-nav .nav-link:focus {
    background: rgba(255,255,255,0.15);
    border-left: 4px solid #fff;
    color: #fff;
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Content Area - Responsive with proper spacing */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 32px 24px;
    background: #f8f9fa;
    margin-left: 280px;
    width: calc(100% - 280px);
}

/* Header */
.header {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    margin-bottom: 32px;
}

.header-content h1 {
    font-size: 2.5rem;
    color: #1e40af;
    margin-bottom: 8px;
    font-weight: 700;
}

.header-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Card and Form Containers */
.card.form-container {
    margin: 0 auto 32px auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 40px;
    background: #fff;
    max-width: 800px;
    width: 100%;
    border: none;
}

.tab-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 40px;
    max-width: 900px;
    margin: 0 auto 32px auto;
    width: 100%;
    border: none;
}

.tab-content {
    display: none;
    animation: fade-in 0.4s ease;
    width: 100%;
}

.tab-content.active {
    display: block;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px); 
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.form-title {
    font-size: 2.2rem;
    color: #1e40af;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.form-title i {
    margin-right: 12px;
    color: #2563eb;
}

.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 2rem;
}

label, .form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

.form-control, .form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    background: #fff;
}

/* Button Groups and Checkboxes */
.radio-group, .checkbox-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.radio-group label, .checkbox-group label {
    margin-bottom: 0;
    font-weight: 500;
    color: #444;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    margin: 0 8px 0 0;
    transform: scale(1.1);
}

.transaction-type-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.transaction-type-label {
    background: #f8fafc;
    color: #333;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.transaction-type-label:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.transaction-type-label.active, 
.transaction-type-label:active, 
.transaction-type-label:focus {
    background: #2563eb !important;
    color: #fff !important;
    border: 2px solid #2563eb !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.transaction-type-label input[type="radio"] {
    display: none;
}

.transaction-type-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.transaction-type-button i {
    font-size: 1.1rem;
}

/* Custom Checkbox Buttons */
.checkbox-button-label {
    background: #f8fafc;
    color: #333;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin: 4px;
    min-width: 140px;
    justify-content: center;
}

.checkbox-button-label:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.checkbox-button-label.active {
    background: #2563eb !important;
    color: #fff !important;
    border: 2px solid #2563eb !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.checkbox-button-label input[type="checkbox"] {
    display: none;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: center;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1.5;
    min-width: 120px;
    justify-content: center;
}

.btn-primary, .generate-button {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-primary:hover, .generate-button:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.btn-secondary, .copy-button {
    background: #64748b;
    color: #fff;
    box-shadow: 0 4px 12px rgba(100,116,139,0.3);
}

.btn-secondary:hover, .copy-button:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100,116,139,0.4);
}

.reset-button, .btn-danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

.reset-button:hover, .btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220,38,38,0.4);
}

/* Output Box */
.output-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    min-height: 120px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    position: relative;
    margin-top: 1rem;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-align: center;
    height: 100%;
    min-height: 80px;
}

.output-placeholder i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.output-placeholder p {
    margin: 0;
    font-size: 1rem;
}

/* Suggestions */
.input-wrapper {
    position: relative;
}

.suggestions {
    z-index: 9999 !important;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.suggestion-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.suggestion-box:empty {
    display: none;
}

.suggestion-box div {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
    font-size: 1rem;
    line-height: 1.4;
}

.suggestion-box div:hover, 
.suggestion-box div.active {
    background: #2563eb;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-area {
        padding: 24px 20px;
    }
    
    .card.form-container,
    .tab-section {
        padding: 32px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
        min-width: 260px;
    }
    
    .content-area {
        margin-left: 260px;
        width: calc(100% - 260px);
        padding: 20px 16px;
    }
    
    .form-title {
        font-size: 2rem;
    }
}

@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        flex-direction: row;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .logo {
        padding: 16px 20px;
        font-size: 1.4rem;
    border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.1);
        background: none;
        width: auto;
    }
    
    .sidebar-nav {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 0;
        flex: 1;
    }
    
    .sidebar-nav ul {
        display: flex;
        flex-direction: row;
        width: 100%;
        padding: 0;
        margin: 0;
        overflow-x: auto;
    }
    
    .sidebar-nav li {
        width: auto;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .sidebar-nav .nav-link {
        padding: 16px 20px;
        font-size: 0.95rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    
    .sidebar-nav .nav-link.active, 
.sidebar-nav .nav-link:focus {
        background: rgba(255,255,255,0.15);
        border-bottom: 3px solid #fff;
        border-left: none;
    }
    
    .content-area {
        margin-left: 0;
        width: 100%;
        padding: 20px 16px;
    }
    
    .card.form-container,
    .tab-section {
        padding: 24px;
        margin: 0 auto 24px auto;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        padding: 8px 0;
    }
    
    .logo {
        padding: 12px 16px;
        font-size: 1.2rem;
    }
    
    .logo span {
        display: none;
    }
    
    .sidebar-nav .nav-link {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .sidebar-nav .nav-link span {
        display: none;
    }
    
    .content-area {
        padding: 16px 12px;
    }
    
    .card.form-container,
    .tab-section {
        padding: 20px;
        margin: 0 auto 20px auto;
    }
    
    .form-title {
        font-size: 1.6rem;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        min-width: 100px;
    }
    
    .button-group {
        gap: 8px;
    }
    
    .transaction-type-label,
.checkbox-button-label {
        padding: 10px 14px;
        font-size: 0.9rem;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .sidebar-nav .nav-link {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .content-area {
        padding: 12px 8px;
    }
    
    .card.form-container,
    .tab-section {
        padding: 16px;
        margin: 0 auto 16px auto;
    }
    
    .form-title {
        font-size: 1.4rem;
    }
    
    .header-content h1 {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    .transaction-type-label,
    .checkbox-button-label {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .form-control, .form-select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .output-box {
        padding: 16px;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .sidebar-nav .nav-link {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .card.form-container,
    .tab-section {
        padding: 12px;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 70px;
    }
    
    .transaction-type-label,
    .checkbox-button-label {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 70px;
    }
}

/* Focus states for accessibility */
.btn:focus, 
.transaction-type-label:focus, 
.checkbox-button-label:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
