/**
 * Utilities - Утилитарные классы и responsive
 * Должен подключаться ПОСЛЕДНИМ
 */

/* ===============================================
   UTILITY CLASSES
   =============================================== */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===============================================
   RESPONSIVE - 480px
   =============================================== */

@media (max-width: 480px) {
    .card {
        width: 38px;
        height: 62px;
    }

    .selected-card, .empty-slot {
        width: 36px;
        height: 54px;
    }

    .selected-area {
        min-height: 60px;
        max-height: 70px;
        padding: 6px;
        gap: 4px;
    }

    .cards-header h1 {
        font-size: 16px;
    }

    .cards-title-area h1 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .counter {
        font-size: 12px;
    }

    .submit-button {
        padding: 10px;
        font-size: 14px;
    }

    .result-card {
        width: 65px;
    }

    .tab-label {
        font-size: 9px;
    }

    .tab-icon {
        font-size: 20px;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===============================================
   RESPONSIVE - 360px
   =============================================== */

@media (max-width: 360px) {
    .card {
        width: 32px;
        height: 52px;
    }

    .selected-card, .empty-slot {
        width: 30px;
        height: 45px;
    }

    .selected-area {
        min-height: 55px;
        max-height: 60px;
        padding: 5px;
        gap: 3px;
    }

    .cards-title-area h1 {
        font-size: 14px;
    }

    .counter {
        font-size: 11px;
    }

    .submit-button {
        padding: 8px;
        font-size: 13px;
    }

    .tab-label {
        display: none;
    }

    .tab-icon {
        font-size: 24px;
    }
}

/* ===============================================
   RESPONSIVE - Small Height (< 600px)
   =============================================== */

@media (max-height: 600px) {
    .cards-container {
        padding: 8px;
    }

    .cards-header {
        padding: 6px 0;
    }

    .card {
        width: 30px;
        height: 48px;
    }

    .selected-area {
        min-height: 50px;
        max-height: 55px;
        padding: 4px;
        gap: 3px;
    }

    .selected-card, .empty-slot {
        width: 28px;
        height: 42px;
    }

    .submit-button {
        padding: 8px;
        font-size: 13px;
    }
}

/* ===============================================
   SAFE AREA (iOS)
   =============================================== */

@supports (padding-top: env(safe-area-inset-top)) {
    .screen-header {
        padding-top: calc(16px + env(safe-area-inset-top));
    }

    .tab-header {
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    .tab-bar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
