/* Main Styles */
:root{
    --primary-color: #5d00ed;
    --primary-color-dark: #4800bd;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
    color: #111827;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-col {
    flex-direction: column;
}

/* Header */
header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
}

.search-input {
    padding-left: 2rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.625rem;
    top: 0.625rem;
    height: 1rem;
    width: 1rem;
    color: #9ca3af;
}
.hidden {
    display: none !important;
}

/* Search dropdown styles */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    max-height: 400px;
    overflow-y: auto;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #4f46e5;
}

.btn-secondary {
    background-color: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.btn-icon {
    margin-right: 0.25rem;
    height: 1rem;
    width: 1rem;
}

.w-full {
    width: 100%;
}

.justify-center {
    justify-content: center;
}

/* Main Layout */
.main-content {
    display: flex;
    min-height: 100vh;
    padding-top: 4.5rem;
}

/* Left Navigation */
.left-nav {
    width: 16rem;
    background-color: white;
    border-right: 1px solid #e5e7eb;
    padding: 1rem;
    position: fixed;
    height: calc(100vh - 4.5rem);
    overflow-y: auto;
    top: 4.5rem;
    z-index: 10;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: #f3f4f6;
}

.nav-item.active {
    background-color: #f3f4f6;
    font-weight: 500;
}

.nav-icon {
    height: 1.25rem;
    width: 1.25rem;
    margin-right: 0.5rem;
    color: #6b7280;
}

.nav-badge {
    margin-left: auto;
    background-color: #e0e7ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0 0.5rem;
    border-radius: 9999px;
    line-height: 1.25rem;
}

.nav-badge-gray {
    background-color: #f3f4f6;
    color: #4b5563;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.eu-badge img {
    width: 15px;
    height: 15px;
    display: inline-block;
    object-fit: contain;
    vertical-align: -4px;
    margin-left: 2px!important;
}
/* Post List */
.post-list {
    width: 24rem;
    background-color: white;
    border-right: 1px solid #e5e7eb;
    position: fixed;
    height: calc(100vh - 4.5rem);
    top: 4.5rem;
    left: 16rem;
    z-index: 10;
}

.post-list-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-list-title {
    font-weight: 500;
}

.post-list-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button {
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.action-button:hover {
    background-color: #f3f4f6;
}

.action-icon {
    height: 1rem;
    width: 1rem;
    color: #6b7280;
}

.post-list-content {
    overflow-y: auto;
    height: calc(100vh - 9rem);
}

.post-item {
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    padding: 1rem;
}

.post-item:hover {
    background-color: #f9fafb;
}

.post-item.active {
    background-color: #f3f4f6;
    border-left: 3px solid var(--primary-color);
}

/* Post Content */
.post-content {
    flex: 1;
    background-color: #f9fafb;
    overflow-y: auto;
    margin-left: 40rem;
    height: calc(100vh - 4.5rem);
}

.content-container {
    padding: 1.5rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.shadcn-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.card-padding {
    padding: 1.5rem;
}

/* Alert styles */
#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    max-width: 400px;
}

.alert {
    transition: opacity 0.3s ease-in-out;
}

.alert.fade-out {
    opacity: 0;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.alert-error, .alert-danger {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #b91c1c;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    color: #b45309;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #374151;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    margin-top: 0.25rem;
}

/* Utility Classes */
.text-xl {
    font-size: 1.15rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-gray-500 {
    color: #6b7280;
}

.text-indigo-600 {
    color: var(--primary-color);
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* ========================================
   MOBILE ENHANCEMENTS
   ======================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improve touch scrolling on iOS */
body {
    -webkit-overflow-scrolling: touch;
}

/* Remove tap delay on mobile */
a, button, input, select, textarea {
    touch-action: manipulation;
}

/* Prevent text size adjustment on iOS */
html {
    -webkit-text-size-adjust: 100%;
}

/* Better focus states for accessibility */
@media (hover: none) {
    button:focus,
    a:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #4f46e5;
        outline-offset: 2px;
    }
}

/* Safe area insets for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Prevent zoom on input focus (iOS) while allowing manual zoom */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    input[type="date"],
    input[type="time"],
    input[type="month"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Import Modal Step Indicators */
#importDomainModal .import-step {
    min-height: 200px;
}

@media (max-width: 640px) {
    #importDomainModal .flex.items-center.justify-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    #importDomainModal .flex-1 {
        display: none;
    }
    
    #importDomainModal #step1-indicator,
    #importDomainModal #step2-indicator,
    #importDomainModal #step3-indicator {
        margin-bottom: 0.5rem;
    }
}
