/* ApartamenTUal Common Styles */

/* Container and Layout */
.container { 
    max-width: 72rem; 
    margin: 0 auto; 
    padding: 0 1rem; 
}

/* Component Styles */
.badge { 
    display: inline-flex; 
    align-items: center; 
    border-radius: 9999px; 
    padding: 0.25rem 0.75rem; 
    font-size: 0.75rem; 
    font-weight: 500; 
    background-color: #f3f4f6; 
}

.card { 
    border: 1px solid #e5e7eb; 
    border-radius: 1rem; 
    padding: 1.25rem; 
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); 
    background-color: white; 
}

.card:hover { 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 
    transition: box-shadow 0.15s;
}

.card-disabled {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.card-disabled:hover {
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
}

/* Button Styles */
button.primary { 
    background-color: #111827; 
    color: white; 
    border-radius: 0.75rem; 
    padding: 0.5rem 1rem; 
    transition: background-color 0.15s;
    border: none;
    cursor: pointer;
}

button.primary:hover { 
    background-color: #000; 
}

button.secondary { 
    background-color: #6b7280; 
    color: white; 
    border-radius: 0.75rem; 
    padding: 0.5rem 1rem; 
    transition: background-color 0.15s;
    border: none;
    cursor: pointer;
}

button.secondary:hover { 
    background-color: #4b5563; 
}

button.danger { 
    background-color: #dc2626; 
    color: white; 
    border-radius: 0.75rem; 
    padding: 0.5rem 1rem; 
    transition: background-color 0.15s;
    border: none;
    cursor: pointer;
}

button.danger:hover { 
    background-color: #b91c1c; 
}

/* Grid Layouts */
.grid-3 { 
    display: grid; 
    gap: 1.5rem; 
}

@media (min-width: 768px) { 
    .grid-3 { 
        grid-template-columns: repeat(3, 1fr); 
    } 
}

.grid-2 { 
    display: grid; 
    gap: 1.5rem; 
}

@media (min-width: 768px) { 
    .grid-2 { 
        grid-template-columns: repeat(2, 1fr); 
    } 
}

/* Typography */
.subtitle { 
    color: #4b5563; 
}

h1, h2, h3 { 
    font-weight: 600; 
}

/* Links */
a { 
    color: #2563eb; 
}

a:hover { 
    text-decoration: underline; 
}

/* Badge Variants */
.badge.bg-green-100 { background-color: #dcfce7; }
.badge.text-green-800 { color: #166534; }
.badge.bg-blue-100 { background-color: #dbeafe; }
.badge.text-blue-800 { color: #1e40af; }
.badge.bg-yellow-100 { background-color: #fef3c7; }
.badge.text-yellow-800 { color: #92400e; }
.badge.bg-red-100 { background-color: #fee2e2; }
.badge.text-red-800 { color: #991b1b; }
.badge.bg-purple-100 { background-color: #f3e8ff; }
.badge.text-purple-800 { color: #6b21a8; }
.badge.bg-orange-100 { background-color: #fed7aa; }
.badge.text-orange-800 { color: #9a3412; }

/* Utility Classes */
.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.transition {
    transition: all 0.15s ease-in-out;
}
/* Teren Details Page Specific Styles */
.teren-image-container {
    position: relative;
    overflow: hidden;
}

.teren-image-container img {
    transition: transform 0.3s ease;
}

.teren-image-container:hover img {
    transform: scale(1.02);
}

.image-modal {
    backdrop-filter: blur(4px);
}

.analysis-section {
    border-left: 4px solid transparent;
    transition: border-color 0.2s ease;
}

.analysis-section:hover {
    border-left-color: #e5e7eb;
}

/* Portable markdown content styling - can be applied to any element */
.markdown-content h1 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.markdown-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.markdown-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.markdown-content p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.markdown-content pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
}

.markdown-content a {
    color: inherit;
    text-decoration: underline;
}

.markdown-content a:hover {
    opacity: 0.8;
}

.markdown-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.markdown-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin: 0.25rem 0;
}

.markdown-content blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6b7280;
}

/* Responsive improvements for details page */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .grid.lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .flex.gap-3 a {
        text-align: center;
    }
}

/* Loading animation improvements */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Error state improvements */
.error-icon {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
