/**
 * PayBadger.com - Responsive Styles
 */

/* Large Devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-image {
        width: 500px;
        right: -50px;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .stats-grid {
        gap: 24px;
    }
}

/* Medium Devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }

    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--black);
        flex-direction: column;
        padding: 30px;
        gap: 30px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid var(--gray-800);
    }

    .navbar-actions {
        flex-direction: column;
        width: 100%;
    }

    .navbar-actions .btn {
        width: 100%;
    }

    .navbar-toggler {
        display: block;
    }

    .hero {
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

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

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

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Dashboard Responsive */
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px;
        gap: 10px;
    }

    .sidebar-link {
        padding: 10px 15px;
    }

    .sidebar-link span {
        display: none;
    }

    .main-panel {
        margin-left: 0;
        padding: 20px;
    }
}

/* Small Devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }

    /* Fix main-content padding for mobile navbar */
    .main-content {
        padding-top: 65px;
    }

    .section {
        padding: 60px 0;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .hero {
        min-height: auto;
        padding: 100px 0 70px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .features-grid,
    .stats-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 30px 24px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

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

    .footer-logo {
        justify-content: center;
    }

    /* Auth Pages */
    .auth-card {
        padding: 30px 20px;
    }

    /* Payment Page */
    .payment-amount {
        font-size: 2.25rem;
    }

    .payment-method-header {
        padding: 16px 20px;
    }

    .payment-method-body {
        padding: 20px;
    }

    .payment-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .payment-detail-value {
        width: 100%;
        justify-content: space-between;
    }

    /* Dashboard Stats */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tables */
    .table-responsive {
        margin: 0 -20px;
        padding: 0 20px;
    }

    .table th,
    .table td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }

    /* Cards */
    .card-body {
        padding: 20px;
    }

    .card-header {
        padding: 16px 20px;
    }

    /* Forms */
    .form-control {
        padding: 10px 14px;
    }

    .btn {
        padding: 10px 20px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* Modal */
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}

/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    /* Fix main-content spacing to match navbar height */
    .main-content {
        padding-top: 60px;
    }

    .section {
        padding: 50px 0;
    }

    /* Remove extra space/white line between navbar and first section */
    .section:first-child,
    .section-dark:first-child {
        margin-top: 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }

    .navbar {
        padding: 12px 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .cta-section {
        padding: 50px 0;
    }

    .footer {
        padding: 40px 0 0;
    }

    .footer-content {
        padding-bottom: 30px;
    }

    /* Dashboard */
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    /* Payment Page */
    .payment-page {
        padding: 20px 15px;
    }

    .payment-header h1 {
        font-size: 1.25rem;
    }

    .payment-amount {
        font-size: 2rem;
    }

    .qr-code canvas {
        max-width: 200px !important;
        height: auto !important;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .table-actions {
        flex-direction: column;
    }

    .table-actions .btn {
        width: 100%;
    }

    /* Alert */
    .alert-container {
        top: 70px;
        padding: 0 15px;
    }

    .alert {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

/* Dashboard Layout Specific */
@media (min-width: 992px) {
    .dashboard-layout {
        display: flex;
        min-height: 100vh;
    }

    .sidebar {
        width: 260px;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        background: var(--black);
        z-index: 100;
        overflow-y: auto;
    }

    .main-panel {
        flex: 1;
        margin-left: 260px;
        padding: 30px;
        background: var(--gray-100);
        min-height: 100vh;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .sidebar,
    .btn,
    .alert-container {
        display: none !important;
    }

    .main-content {
        padding-top: 0;
    }

    .main-panel {
        margin-left: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }

    body {
        background: white;
    }

    a {
        color: var(--black);
    }

    .payment-page {
        background: white;
        padding: 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .feature-icon,
    .payment-method-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable automatic dark mode
    :root {
        --gray-100: #1a1a1a;
        --gray-200: #2d2d2d;
        --gray-300: #404040;
        --gray-400: #525252;
        --gray-500: #737373;
        --gray-600: #a3a3a3;
        --gray-700: #d4d4d4;
        --gray-800: #e5e5e5;
        --gray-900: #f5f5f5;
        --white: #0a0a0a;
        --black: #fafafa;
    }

    body {
        background-color: #0a0a0a;
        color: var(--gray-700);
    }
    */
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }

    .nav-link::after {
        display: none;
    }

    .btn {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 50px;
    }

    .auth-page {
        padding: 80px 20px;
    }

    .payment-page {
        padding: 20px;
    }
}

/* Enhanced Mobile Payment Page Styles */
@media (max-width: 576px) {
    /* Payment page header */
    .payment-header {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .pay-lang-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .pay-lang-dropdown {
        min-width: 180px;
        right: 0;
    }

    /* Payment summary card - new layout */
    .payment-summary {
        padding: 18px;
        border-radius: 14px;
    }

    .summary-header {
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .payment-logo {
        font-size: 1.1rem;
    }

    .summary-title-section {
        margin-bottom: 16px;
    }

    .summary-badge {
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    .payment-summary h1 {
        font-size: 1.3rem;
    }

    .payment-description {
        font-size: 0.9rem;
    }

    /* Amount section mobile - minimal card */
    .summary-amount-section {
        padding: 14px;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .amount-value {
        font-size: 1.25rem;
    }

    .currency-badge {
        font-size: 0.7rem;
    }

    .amount-crypto {
        font-size: 0.75rem;
        margin-top: 6px;
    }

    /* Seller section mobile */
    .summary-seller-section {
        margin-bottom: 14px;
    }

    .seller-card {
        padding: 12px 14px;
        gap: 10px;
    }

    .seller-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .seller-name {
        font-size: 0.9rem;
    }

    .seller-verified {
        font-size: 1rem;
    }

    /* Countdown mobile */
    .summary-countdown-section {
        margin-bottom: 14px;
    }

    .countdown-box {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .countdown-timer {
        font-size: 1.3rem;
    }

    /* Security footer mobile */
    .summary-security {
        padding-top: 14px;
        font-size: 0.75rem;
    }

    /* Payment steps card */
    .payment-steps {
        padding: 14px;
        border-radius: 14px;
    }

    .stepper {
        gap: 8px;
    }

    .step-dot {
        padding: 10px;
        font-size: 0.85rem;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .step-content h3 {
        font-size: 1.1rem;
    }

    /* Payment method cards */
    .payment-method-card {
        border-radius: 12px;
    }

    .payment-method-header {
        padding: 14px;
        gap: 10px;
    }

    .payment-method-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .payment-method-header h4 {
        font-size: 0.95rem;
    }

    .method-sub {
        font-size: 0.8rem;
    }

    .card-brands {
        display: none;
    }

    .payment-method-body {
        padding: 14px;
    }

    /* Crypto QR */
    .crypto-qr-block {
        padding: 16px;
        border-radius: 12px;
    }

    .crypto-qr {
        width: 200px !important;
        height: 200px !important;
        padding: 8px;
    }

    .wallet-address-text {
        font-size: 0.75rem;
        max-width: 100%;
    }

    /* Form elements */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    #backToMethods {
        order: 2;
    }

    #submitBtn {
        order: 1;
    }

    /* File upload */
    .file-label {
        padding: 20px;
    }

    .file-label i {
        font-size: 1.5rem;
    }

    /* Abstract background shapes - reduce on mobile */
    .abstract-shape {
        opacity: 0.3;
        filter: blur(80px);
    }

    .abstract-shape-1 {
        width: 250px;
        height: 250px;
    }

    .abstract-shape-2 {
        width: 200px;
        height: 200px;
    }

    .abstract-shape-3,
    .abstract-shape-4 {
        display: none;
    }
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
    .navbar-menu {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .navbar-actions {
        padding-top: 20px;
        border-top: 1px solid var(--gray-800);
        margin-top: 10px;
    }

    /* Language selector in sidebar - mobile */
    .sidebar-language {
        padding: 12px 16px;
    }

    .sidebar-language-dropdown {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 280px;
        max-height: 70vh;
        border-radius: var(--border-radius-lg);
    }
}

/* Seller Dashboard Mobile Improvements */
@media (max-width: 767.98px) {
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .panel-title {
        font-size: 1.5rem;
    }

    .links-table-header {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .links-table-header h3 {
        font-size: 1.1rem;
    }

    .empty-state {
        padding: 40px 16px;
    }

    .empty-state-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Transaction table mobile */
    .transaction-row {
        flex-direction: column;
        gap: 8px;
        padding: 16px;
    }
}

/* Improved touch targets */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }

    .form-control {
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .sidebar-link {
        min-height: 48px;
    }

    .payment-method-header {
        min-height: 60px;
    }

    .pay-lang-option {
        min-height: 44px;
    }

    .coin-tab-inner {
        min-height: 44px;
    }
}
