/* Responsive CSS - Mobilo un tabletu skatiem */

@media (max-width: 1024px) {
    /* Laptop/nabadzīgās laptops */
    .max-w-7xl {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .lg\\:col-span-3 {
        grid-column: span 3;
    }
    
    .lg\\:col-span-6 {
        grid-column: span 6;
    }
    
    nav .flex-wrap {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    /* Tablet */
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .lg\\:col-span-3,
    .lg\\:col-span-6 {
        grid-column: span 1;
    }
    
    .md\\:hidden {
        display: none;
    }
    
    .md\\:block {
        display: block;
    }
    
    /* Header uzlabojumi */
    h1 {
        font-size: 2.5rem;
    }
    
    /* Navigation */
    nav .flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    nav input {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Kartītes */
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    /* Teksts */
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .text-xl {
        font-size: 1.25rem;
    }
    
    /* Padding */
    .p-6 {
        padding: 1.5rem;
    }
    
    .p-4 {
        padding: 1rem;
    }
    
    /* Flex */
    .flex-col {
        flex-direction: column;
    }
    
    /* Table skrols */
    table {
        font-size: 0.875rem;
    }
    
    thead {
        display: none;
    }
    
    tbody tr {
        display: grid;
        gap: 0.5rem;
        border: 1px solid var(--color-border);
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }
    
    tbody td {
        display: block;
        position: relative;
        padding-left: 50%;
    }
    
    tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        font-weight: bold;
        width: 50%;
    }
}

@media (max-width: 480px) {
    /* Mobilais */
    .max-w-7xl {
        padding: 0 0.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .text-sm {
        font-size: 0.875rem;
    }
    
    /* Buttons atlikti uz apakšu */
    .flex-wrap {
        flex-direction: column;
    }
    
    .grid {
        gap: 1rem;
    }
    
    /* News attēls */
    .w-64 {
        width: 100%;
    }
    
    .flex-col {
        flex-direction: column;
    }
    
    /* Card padding */
    .p-6 {
        padding: 1rem;
    }
    
    /* Avatar */
    .w-8,
    .w-10,
    .w-16,
    .w-20 {
        width: auto;
        height: auto;
    }
    
    /* Server monitor */
    .w-24 {
        width: 80px;
        height: 80px;
    }
    
    .w-16,
    .h-16 {
        width: 60px;
        height: 60px;
    }
    
    /* Input input */
    input,
    select,
    button {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Footer */
    footer {
        padding: 1rem;
    }
    
    footer .grid {
        grid-template-columns: 1fr;
    }
}

/* LandscapeMode */
@media (max-height: 600px) and (orientation: landscape) {
    header {
        height: 150px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    nav {
        padding: 0.5rem 0;
    }
    
    .space-y-6 {
        gap: 1.5rem;
    }
}

/* Dark Mode (ja nepieciešams) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #e2e8f0;
    }
    
    .bg-gray-800 {
        background-color: #1e293b;
    }
    
    .bg-gray-700 {
        background-color: #334155;
    }
    
    .text-gray-300 {
        color: #cbd5e1;
    }
    
    .text-gray-400 {
        color: #94a3b8;
    }
}

/* Printējums */
@media print {
    nav,
    footer,
    .chat-widget,
    button {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .bg-gray-800 {
        background-color: #f3f4f6 !important;
        border: 1px solid #e5e7eb !important;
    }
    
    a {
        color: #2563eb;
        text-decoration: underline;
    }
}
