/* ماشین حساب U-Value - Modern Persian UI */

/* Import FontAwesome for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* CSS Custom Properties for Modern Color Palette */
:root {
    /* Primary Colors - Modern Blue Gradient */
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);

    /* Secondary Colors - Modern Teal */
    --secondary-color: #0d9488;
    --secondary-dark: #0f766e;
    --secondary-light: #2dd4bf;

    /* Success Colors */
    --success-color: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;

    /* Warning Colors */
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --warning-light: #fbbf24;

    /* Error Colors */
    --error-color: #ef4444;
    --error-dark: #dc2626;
    --error-light: #f87171;

    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Background Gradients */
    --bg-gradient-main: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    --bg-gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --bg-gradient-header: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: all 0.15s ease-in-out;
    --transition-normal: all 0.3s ease-in-out;
    --transition-slow: all 0.5s ease-in-out;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: var(--gray-700);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    min-height: 100vh;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 1rem;
}

/* Modern Container */
#body {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Optimized Modern Card Design */
.modern-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

.modern-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 
                0 10px 10px -5px rgba(0, 0, 0, 0.08);
}

/* Modern Optimized Header */
#header {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #2563eb 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 3rem 2rem !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.3), 
                0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem !important;
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(139, 69, 255, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

#header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    font-weight: 900 !important;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    position: relative;
    z-index: 2;
    letter-spacing: -0.025em;
    color: white !important;
    margin: 0 !important;
    margin-bottom: 1rem !important;
}

#header h1 i {
    margin-left: 1rem;
    color: rgba(255,255,255,0.95) !important;
    font-size: 0.8em;
}

#header p {
    color: rgba(255,255,255,0.95) !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    position: relative;
    z-index: 2;
    margin: 0 !important;
}

#header p a {
    color: rgba(255,255,255,0.95) !important;
    text-decoration: underline;
    transition: all 0.3s ease;
}

#header p a:hover {
    color: #ffffff !important;
    text-decoration-color: #ffffff;
}

/* Modern Input Fields - Scoped to form sections */
.form-section input[type="text"], 
.form-section input[type="email"], 
.form-section textarea, 
.form-section select {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.3s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.form-section input[type="text"]:focus, 
.form-section input[type="email"]:focus, 
.form-section textarea:focus, 
.form-section select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1),
                0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

/* Modern Buttons */
.btn, button, input[type="button"], input[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.btn:hover, button:hover, input[type="button"]:hover, input[type="submit"]:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.btn:active, button:active, input[type="button"]:active, input[type="submit"]:active {
    transform: translateY(0);
    transition: all 0.1s ease-in-out;
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-color) 100%);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-dark) 100%);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--warning-color) 100%);
}

/* Error Button */
.btn-error {
    background: linear-gradient(135deg, var(--error-color) 0%, var(--error-dark) 100%);
}

.btn-error:hover {
    background: linear-gradient(135deg, var(--error-light) 0%, var(--error-color) 100%);
}

/* Optimized Modern Table Design */
table {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 1rem;
    text-align: center;
    border: none;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

table th:first-child {
    border-top-right-radius: 1rem;
}

table th:last-child {
    border-top-left-radius: 1rem;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

table tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:last-child td:first-child {
    border-bottom-right-radius: 1rem;
}

table tr:last-child td:last-child {
    border-bottom-left-radius: 1rem;
}

/* Modern Form Sections */
.form-section {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease-in-out;
}

.form-section:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.form-section h3 {
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: var(--primary-color);
    font-size: 1.2em;
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Optimized Modern Table */
.modern-table {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.modern-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 1rem 0.75rem;
    text-align: center;
    border: none;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modern-table th:first-child {
    border-top-right-radius: 1rem;
}

.modern-table th:last-child {
    border-top-left-radius: 1rem;
}

.modern-table td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    background: rgba(255, 255, 255, 0.8);
}

.modern-table tr:hover td {
    background: rgba(59, 130, 246, 0.05);
    transform: scale(1.01);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:last-child td:first-child {
    border-bottom-right-radius: 1rem;
}

.modern-table tr:last-child td:last-child {
    border-bottom-left-radius: 1rem;
}

/* Surface resistance rows styling */
.modern-table tbody tr[style*="background-color: #F0F0F0"] td {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    font-weight: 600;
    color: var(--gray-700);
}

.modern-table tbody tr[style*="background-color: #F0F0F0"]:hover td {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Status and Results Cards */
.results-card {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
    margin: 1rem 0;
}

.results-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.results-card .value {
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.results-card .unit {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Improved Buttons in Table */
.modern-table .edit-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    color: var(--primary-color);
}

.modern-table .edit-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Modern Button Styles */
.btn, button, input[type="button"], input[type="submit"] {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition-normal);
    text-align: center;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--primary-gradient);
    color: white;
    margin: 0.25rem;
}

.btn::before, button::before, input[type="button"]::before, input[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-normal);
}

.btn:hover, button:hover, input[type="button"]:hover, input[type="submit"]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn:hover::before, button:hover::before, input[type="button"]:hover::before, input[type="submit"]:hover::before {
    left: 100%;
}

.btn:active, button:active, input[type="button"]:active, input[type="submit"]:active {
    transform: translateY(0) scale(0.98);
    transition: var(--transition-fast);
}

/* Input Fields */
input[type="text"], input[type="number"], input[type="email"], select, textarea {
    padding: 0.875rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition-normal);
    background: white;
    width: 100%;
}

/* Enhanced table mobile support */
.table-wrapper {
    position: relative;
    width: 100%;
}

@media (max-width: 480px) {
    .table-responsive table {
        min-width: 500px;
        font-size: 0.65rem;
    }

    .table-responsive table th,
    .table-responsive table td {
        padding: 0.25rem 0.1rem;
        white-space: nowrap;
    }

    /* Sticky first column on mobile */
    .table-responsive table th:first-child,
    .table-responsive table td:first-child {
        position: sticky;
        right: 0;
        background: var(--gray-50);
        z-index: 1;
    }
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.table-responsive table {
    min-width: 600px;
    margin: 0;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

table th {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
}

table td {
    padding: 0.875rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

table tr:nth-child(even) {
    background: var(--gray-50);
}

table tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* Cards and containers */
#contents, .container, div[style*="background"] {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: var(--radius-xl) !important;
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: var(--shadow-md) !important;
    padding: 2rem !important;
    margin: 1rem 0 !important;
    transition: var(--transition-normal);
}

#contents:hover, .container:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: var(--shadow-xl) !important;
    transform: translateY(-2px);
}

/* Material Selection Panel Improvements */
#MaterialSelection {
    background: var(--bg-gradient-card) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 2rem !important;
    margin: 1.5rem 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: var(--transition-normal);
}

#MaterialSelection:hover {
    box-shadow: var(--shadow-xl) !important;
    transform: translateY(-1px);
}

/* Enhanced spacing for key sections */
#uvc_toolbar_table {
    padding: 1.5rem;
    margin: 2rem 0;
}

/* Calculator table improvements */
.layers-table-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    margin: 1rem 0;
    overflow: hidden;
}

/* Results section spacing */
#elementUvalue {
    background: var(--bg-gradient-card);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        font-size: 14px;
    }

    .container {
        padding: 1rem !important;
    }

    #header {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1rem !important;
    }

    #header h1 {
        font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
    }

    #header h1 i {
        margin-left: 0.5rem;
    }

    .btn, button, input[type="button"], input[type="submit"] {
        width: 100%;
        margin: 0.3rem 0;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    table {
        font-size: 0.75rem;
    }

    table th, table td {
        padding: 0.4rem 0.2rem;
    }

    #MaterialSelection {
        padding: 1rem !important;
        margin: 1rem 0 !important;
    }

    /* Stack elements vertically on mobile */
    #elementUvalue {
        float: none !important;
        margin: 1rem 0 !important;
        text-align: center;
    }

    /* Mobile-friendly tooltips */
    [title] {
        position: relative;
    }
}

@media (max-width: 480px) {
    #header h1 {
        font-size: 1.5rem !important;
    }

    .btn, button {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    table {
        font-size: 0.7rem;
    }

    table th, table td {
        padding: 0.3rem 0.1rem;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 1.5rem !important;
    }

    #header {
        padding: 2.5rem 1.5rem !important;
    }

    table {
        font-size: 0.9rem;
    }

    .btn, button {
        padding: 0.8rem 1.2rem;
    }
}

/* Enhanced Loading and Animations */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-light);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Enhanced hover effects for interactive elements */
table tr {
    transition: var(--transition-fast);
}

table tr:hover {
    background: rgba(59, 130, 246, 0.05) !important;
    transform: translateX(2px);
}

/* Input focus animations */
input[type="text"]:focus, 
input[type="number"]:focus, 
select:focus, 
textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
}

/* Staggered animation for menu items */
@keyframes slideInStagger {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.materials-menu-item {
    animation: slideInStagger 0.3s ease-out;
}

.materials-menu-item:nth-child(1) { animation-delay: 0.1s; }
.materials-menu-item:nth-child(2) { animation-delay: 0.2s; }
.materials-menu-item:nth-child(3) { animation-delay: 0.3s; }

/* Pulse animation for important elements */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Menu and Navigation - Optimized */
#MaterialSelection {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 1.5rem !important;
    margin: 1rem 0 !important;
}

/* Compact material menu styles */
.material-category-item,
#materials_menu_panel .material-item,
#materials_menu_panel .material-category,
#materials_content div,
#materials_menu_panel div {
    font-size: 12px !important;
    padding: 6px 12px !important;
    margin: 1px 0 !important;
    line-height: 1.3 !important;
}

/* Smaller submenu items */
.material-submenu-item {
    font-size: 11px !important;
    padding: 4px 10px !important;
    margin: 0.5px 0 !important;
}

/* Back button smaller */
#materials_menu_panel .back-button,
.back-button {
    font-size: 11px !important;
    padding: 6px 10px !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Print media styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    #header {
        background: #333 !important;
        color: white !important;
    }

    .btn, button {
        display: none !important;
    }
}

/* PDF Modal Animation */
#pdfConfirmModal {
    animation: fadeIn 0.3s ease-in-out;
}

#pdfConfirmModal > div {
    animation: slideDown 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translate(-50%, -60%); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%); 
    }
}

/* Button hover effects */
#pdfYesBtn:hover {
    background: #45a049 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

#pdfNoBtn:hover {
    background: #da190b !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* Disabled button state */
#pdfYesBtn:disabled, #pdfNoBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Feedback Button - Normal Button Style */
#feedbackBtn {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    cursor: pointer !important;
    font-family: 'Vazirmatn', 'Vazir', sans-serif !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin: 0.5rem 0 !important;
}

#feedbackBtn:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-2px) !important;
}

#feedbackBtn:active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.1s ease-in-out !important;
}

/* Feedback Modal - Centered Popup */
#feedbackModal {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
    width: 500px !important;
    max-width: calc(100vw - 40px) !important;
}

#feedbackModal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

#feedbackModal.show {
    display: block !important;
    animation: fadeInScale 0.3s ease-out !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Feedback Modal Content - Info Popup Style */
#feedbackModal .modal-content {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 
                0 10px 10px -5px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

/* Feedback Modal buttons and form */
#feedbackModal input,
#feedbackModal textarea {
    width: 100% !important;
    box-sizing: border-box !important;
}

#feedbackModal button {
    transition: all 0.2s ease !important;
}

#feedbackModal button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

#feedbackModal button:active {
    transform: translateY(0) !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #feedbackBtn {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
        width: 100%;
    }

    #feedbackModal {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }
}

/* Project Information Card */
#Project_Address {
    position: relative !important;
}