/* components.css */
/* Стили для UI компонентов - Оптимизированная версия */

/* Quick Navigation */
.quick-nav {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Component Categories & Sections */
.component-category {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bg-surface-variant);
}

.component-category:last-child {
    border-bottom: none;
}

.component-category h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.component-section {
    margin-bottom: 3rem;
}

.component-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-surface-variant);
}

/* Component Grid & Cards - ИСПРАВЛЕНА МОБИЛЬНАЯ ВЕРСТКА */
.component-grid {
    display: grid;
    grid-template-columns: 1fr; /* Всегда одна колонка на мобильных */
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (min-width: 768px) {
    .component-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

.component-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--bg-surface-variant);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Предотвращаем выпадание контента */
}

.component-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
}

.component-preview {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    justify-content: center;
    min-height: 150px;
    border: 1px solid var(--bg-surface-variant);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.component-code {
    margin-bottom: 1rem;
    flex-grow: 1;
    width: 100%;
    min-width: 0; /* Исправляем flexbox переполнение */
}

.code-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--bg-surface-variant);
    max-width: 100%;
}

.code-scroll-wrapper pre {
    margin: 0;
    min-width: min-content;
    padding: 1rem;
    width: max-content;
    max-width: 100%;
}

.code-scroll-wrapper code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: pre;
    word-wrap: normal;
    display: block;
    max-width: 100%;
}

.copy-btn {
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}

.copy-btn.copied {
    background: var(--secondary);
    color: var(--text-on-accent);
    border-color: var(--secondary);
}

/* Component Stats */
.component-stats {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.component-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--bg-surface);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--bg-surface-variant);
    white-space: nowrap;
}

/* Button Variants */
.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--bg-surface-variant);
    border-color: var(--bg-surface-variant);
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

/* Input Styles */
.input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 2px solid var(--bg-surface-variant);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.1);
}

.input::placeholder {
    color: var(--text-secondary);
}

.input-error {
    border-color: #f44336;
}

.input-error:focus {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.input-success {
    border-color: #4caf50;
}

.input-success:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Card Styles */
.card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--bg-surface-variant);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.card-header {
    padding: 1.5rem 1.5rem 0;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.card-content {
    padding: 1rem 1.5rem;
}

.card-actions {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-elevated {
    box-shadow: var(--shadow-2);
    border: 1px solid transparent;
}

.card-outlined {
    border: 2px solid var(--bg-surface-variant);
    background: transparent;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--primary);
    position: relative;
    animation: modalAppear 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-sm .modal-content {
    max-width: 400px;
}

.modal-lg .modal-content {
    max-width: 800px;
}

.modal-xl .modal-content {
    max-width: 1200px;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Tabs Styles */
.tabs-container {
    width: 100%;
    overflow: hidden;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--bg-surface-variant);
    margin-bottom: 1rem;
    flex-wrap: wrap;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-surface-variant);
}

.tab-content {
    display: none;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: var(--border-radius-md);
    width: 100%;
    box-sizing: border-box;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Accordion Styles */
.accordion {
    width: 100%;
}

.accordion-item {
    border: 1px solid var(--bg-surface-variant);
    border-radius: var(--border-radius-md);
    margin-bottom: 0.5rem;
    overflow: hidden;
    width: 100%;
}

.accordion-item:first-child {
    border-top-left-radius: var(--border-radius-md);
    border-top-right-radius: var(--border-radius-md);
}

.accordion-item:last-child {
    border-bottom-left-radius: var(--border-radius-md);
    border-bottom-right-radius: var(--border-radius-md);
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.accordion-header:hover {
    background: var(--bg-surface-variant);
}

.accordion-header.active {
    background: var(--primary);
    color: var(--text-on-accent);
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-weight: bold;
    flex-shrink: 0;
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-primary);
    width: 100%;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-content p {
    padding: 1.5rem;
    margin: 0;
    line-height: 1.6;
}

/* Form Components */
.select {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 2px solid var(--bg-surface-variant);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.1);
}

.select-multiple {
    height: 120px;
}

/* Checkbox & Radio */
.checkbox,
.radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
    user-select: none;
    width: fit-content;
}

.checkbox input,
.radio input {
    display: none;
}

.checkmark,
.radiomark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-surface-variant);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radiomark {
    border-radius: 50%;
}

.checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio input:checked + .radiomark {
    border-color: var(--primary);
}

.radio input:checked + .radiomark::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.checkbox:hover .checkmark,
.radio:hover .radiomark {
    border-color: var(--primary);
}

.checkbox input:disabled + .checkmark,
.radio input:disabled + .radiomark {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox input:disabled ~ .label,
.radio input:disabled ~ .label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Slider Styles */
.slider-container {
    width: 100%;
    max-width: 300px;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-surface-variant);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(187, 134, 252, 0.2);
}

.slider-value,
.slider-values {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-item:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.pagination-item {
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--bg-surface-variant);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.pagination-item:hover:not(:disabled) {
    background: var(--bg-surface-variant);
    border-color: var(--primary);
}

.pagination-item.active {
    background: var(--primary);
    color: var(--text-on-accent);
    border-color: var(--primary);
}

.pagination-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    min-width: 600px; /* Минимальная ширина для скролла */
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--bg-surface-variant);
    white-space: nowrap;
}

.table th {
    background: var(--bg-surface-variant);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: var(--bg-surface-variant);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.badge-warning {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.badge-error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.badge-info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

/* Progress Bar */
.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-surface-variant);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-success {
    background: #4caf50;
}

.progress-warning {
    background: #ff9800;
}

.progress-error {
    background: #f44336;
}

.progress-bar.striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

.progress-bar.animated {
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    border-left: 4px solid;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.alert-content {
    flex: 1;
    min-width: 0; /* Исправляем переполнение текста */
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196f3;
    color: #2196f3;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
    color: #4caf50;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: #ff9800;
    color: #ff9800;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
    color: #f44336;
}

/* Toast Container */
.toast-container {
    position: fixed;
    z-index: 10001;
    padding: 1rem;
    max-width: 400px;
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

.toast-container.top-right {
    top: 0;
    right: 0;
}

.toast-container.top-left {
    top: 0;
    left: 0;
}

.toast-container.bottom-right {
    bottom: 0;
    right: 0;
}

.toast-container.bottom-left {
    bottom: 0;
    left: 0;
}

.toast {
    background: var(--bg-surface);
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-3);
    border-left: 4px solid;
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.toast.success {
    border-left-color: #4caf50;
}

.toast.error {
    border-left-color: #f44336;
}

.toast.warning {
    border-left-color: #ff9800;
}

.toast.info {
    border-left-color: #2196f3;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design - УЛУЧШЕННАЯ МОБИЛЬНАЯ ВЕРСТКА */
@media (max-width: 767px) {
    .component-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .component-card {
        padding: 1rem;
        margin: 0;
        width: 100%;
    }
    
    .component-preview {
        padding: 1rem;
        min-height: 120px;
        gap: 0.75rem;
    }
    
    .tabs {
        flex-direction: row;
        overflow-x: auto;
        border-bottom: 2px solid var(--bg-surface-variant);
    }
    
    .tab {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
    }
    
    .quick-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .quick-nav .btn {
        width: 100%;
        text-align: center;
    }
    
    .component-stats {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .component-stat {
        width: auto;
        justify-content: center;
        text-align: center;
    }
    
    .code-scroll-wrapper code {
        font-size: 0.7rem;
        padding: 0.5rem;
    }
    
    .code-scroll-wrapper pre {
        padding: 0.75rem;
    }
    
    .table {
        min-width: 500px;
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 8px 12px;
    }
    
    .breadcrumbs {
        padding: 0.5rem 0;
    }
    
    .pagination {
        justify-content: flex-start;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .component-category h2 {
        font-size: 1.5rem;
        padding-left: 0.75rem;
    }
    
    .component-section h3 {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        padding: 1rem;
    }
    
    .alert {
        padding: 0.75rem 1rem;
    }
    
    .modal-content {
        padding: 1.25rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .component-card:hover {
        transform: none;
    }
    
    .tab:hover:not(.active) {
        background: none;
    }
    
    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .input::placeholder {
        color: var(--text-secondary);
    }
    
    .select {
        background: var(--bg-surface);
        color: var(--text-primary);
    }
    
    .table {
        background: var(--bg-surface);
    }
    
    .table th {
        background: var(--bg-surface-variant);
    }
}

/* Print styles */
@media print {
    .component-preview {
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .code-scroll-wrapper {
        border: 1px solid #ccc;
        background: white !important;
    }
    
    .copy-btn {
        display: none;
    }
    
    .component-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .component-card {
        border: 2px solid;
    }
    
    .input {
        border: 2px solid;
    }
    
    .btn {
        border: 2px solid;
    }
    
    .tab {
        border: 1px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .component-card,
    .btn,
    .input,
    .modal-content,
    .tab,
    .accordion-header,
    .progress-bar,
    .toast,
    .alert {
        transition: none;
    }
    
    .loading::after {
        animation: none;
    }
    
    .progress-bar.animated {
        animation: none;
    }
    
    .toast {
        animation: none;
    }
    
    .modal-content {
        animation: none;
    }
}

/* Safe area insets for notched devices */
@supports(padding: max(0px)) {
    .modal {
        padding: max(20px, env(safe-area-inset-top)) 
                 max(20px, env(safe-area-inset-right)) 
                 max(20px, env(safe-area-inset-bottom)) 
                 max(20px, env(safe-area-inset-left));
    }
    
    .toast-container {
        padding: max(1rem, env(safe-area-inset-top)) 
                 max(1rem, env(safe-area-inset-right)) 
                 max(1rem, env(safe-area-inset-bottom)) 
                 max(1rem, env(safe-area-inset-left));
    }
}
