/**
 * CSS untuk elemen UI responsif tambahan
 * File ini berisi style tambahan untuk memastikan semua elemen UI tampil dengan baik di berbagai ukuran layar
 */

/* Responsivitas untuk card dan panel */
.card {
    overflow: hidden;
    height: auto !important;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .card-header, .card-footer {
        padding: 0.75rem 1rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
}

/* Responsivitas untuk modal */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-footer .btn {
        margin: 0.25rem;
        min-width: 120px;
    }
}

/* Responsivitas untuk tombol */
@media (max-width: 576px) {
    .btn-group, .btn-toolbar {
        display: flex;
        flex-wrap: wrap;
    }
    
    .btn-group .btn, .btn-toolbar .btn {
        flex: 1 1 auto;
        margin-bottom: 0.25rem;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-right: 0 !important;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.8rem;
        font-weight: 600;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .header h5 {
        margin-bottom: 0.75rem;
    }
}

/* Styling untuk tombol aksi pada tampilan desktop */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.action-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.action-buttons .btn i {
    margin-right: 0.25rem;
}

/* Responsivitas untuk alert dan notifikasi */
@media (max-width: 768px) {
    .alert {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .toast {
        max-width: 100%;
        width: calc(100% - 2rem);
    }
}

/* Responsivitas untuk pagination */
@media (max-width: 576px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-item {
        margin-bottom: 0.25rem;
    }
    
    .pagination .page-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Responsivitas untuk tab dan pills */
@media (max-width: 768px) {
    .nav-tabs, .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link, .nav-pills .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Responsivitas untuk dropdown */
@media (max-width: 576px) {
    .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100%;
        border-radius: 0;
        margin-top: 0;
        bottom: 0;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .dropdown-menu.show {
        transform: translateY(0);
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
}

/* Responsivitas untuk file upload */
@media (max-width: 768px) {
    .custom-file-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    input[type="file"] {
        font-size: 0.875rem;
    }
}

/* Responsivitas untuk stepper/wizard */
@media (max-width: 768px) {
    .stepper, .wizard-steps {
        flex-direction: column;
    }
    
    .stepper-item, .wizard-step {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Responsivitas untuk timeline */
@media (max-width: 768px) {
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline-point {
        left: -0.5rem;
    }
}
