/* ===== RESPONSIVE DESIGN COMPACTO ===== */

/* ===== LARGE TABLETS & SMALL LAPTOPS ===== */
@media (max-width: 768px) {
    .main-content {
        padding: 0.5rem;
        min-height: calc(100vh - 90px);
    }
    
    .profile-card {
        max-width: 100%;
    }
    
    .booking-modal {
        padding: 1rem;
        max-width: 95vw;
    }
    
    .date-selector {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .time-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .step-navigation .back-btn,
    .step-navigation .continue-btn {
        width: 100%;
    }
}

/* ===== MOBILE DEVICES ULTRA COMPACTO ===== */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem;
        min-height: 48px;
    }
    
    .header-btn {
        width: 32px;
        height: 32px;
    }
    
    .header-logo {
        height: 24px;
    }
    
    .notification-badge {
        min-width: 14px;
        height: 14px;
        font-size: 0.65rem;
    }
    
    .location-bar {
        padding: 0.375rem 0.5rem;
        min-height: 36px;
    }
    
    .location-info {
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    
    .main-content {
        padding: 0.375rem;
        min-height: calc(100vh - 84px);
        min-height: calc(100dvh - 84px);
        padding-top: 0.125rem;
        padding-bottom: 0.375rem;
    }
    
    .profile-content {
        padding: 8px;
    }
    
    .profile-header {
        margin-bottom: 6px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .profile-name {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .online-status {
        font-size: 0.65rem;
    }
    
    .status-dot {
        width: 4px;
        height: 4px;
    }
    
    .audio-section,
    .profile-tagline,
    .values-section,
    .profile-stats,
    .profile-location,
    .profile-description {
        margin-bottom: 6px;
    }
    
    .audio-label {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }
    
    .audio-player {
        padding: 5px 8px;
        gap: 6px;
        border-radius: 14px;
    }
    
    .play-btn {
        width: 16px;
        height: 16px;
    }
    
    .play-btn svg {
        width: 7px;
        height: 7px;
    }
    
    .play-btn svg {
        width: 8px;
        height: 8px;
    }
    
    .audio-waves {
        gap: 1px;
        height: 14px;
        padding: 0 3px;
    }
    
    .wave {
        width: 1.5px;
        max-width: 2px;
        height: 2px;
        min-height: 2px;
    }
    
    .wave:nth-child(odd) { height: 4px; }
    .wave:nth-child(even) { height: 6px; }
    .wave:nth-child(3n) { height: 8px; }
    .wave:nth-child(5n) { height: 10px; }
    .wave:nth-child(7n) { height: 6px; }
    
    .audio-time {
        font-size: 0.65rem;
        min-width: 28px;
    }
    
    .profile-tagline {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .values-header {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }
    
    .main-value {
        font-size: 0.75rem;
        padding: 2px 0;
    }
    
    .dropdown-arrow {
        width: 12px;
        height: 12px;
        margin-left: 4px;
    }
    
    .stat-item {
        font-size: 0.65rem;
        margin-bottom: 3px;
        gap: 3px;
    }
    
    .stat-item svg {
        width: 12px;
        height: 12px;
    }
    
    .stat-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    
    .profile-location {
        font-size: 0.65rem;
        gap: 3px;
        margin-bottom: 6px;
    }
    
    .profile-location svg {
        width: 12px;
        height: 12px;
    }
    
    .profile-description {
        margin-bottom: 8px;
    }
    
    .profile-description p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .profile-description p.collapsed {
        max-height: 3em; /* 2.5 linhas */
        -webkit-line-clamp: 2;
    }
    
    .read-more-btn {
        font-size: 0.7rem;
        margin-top: 4px;
        padding: 2px 0;
    }
    
    .cta-button {
        padding: 10px;
        font-size: 0.85rem;
        gap: 6px;
        border-radius: 8px;
    }
    
    .cta-button svg {
        width: 18px;
        height: 18px;
    }
    
    /* MODAL MOBILE OTIMIZADO E COMPACTO */
    .modal {
        padding: 0.25rem;
        align-items: flex-start;
        padding-top: 0.5rem;
        height: 100vh;
        height: 100dvh;
    }
    
    .booking-modal {
        padding: 0.75rem;
        max-width: 96vw;
        max-height: 88vh;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .step-indicator {
        margin-bottom: 0.75rem;
        gap: 0.25rem;
    }
    
    .step {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    .step-line {
        width: 14px;
    }
    
    .step-content h2 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 0.5rem;
    }
    
    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .date-selector {
        grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
        gap: 0.375rem;
        max-height: 140px;
        padding: 0.375rem;
        margin-bottom: 1rem;
    }
    
    .date-option {
        padding: 0.5rem 0.25rem;
        min-height: 50px;
        border-radius: 6px;
    }
    
    .date-day {
        font-size: 0.7rem;
        margin-bottom: 0.125rem;
        font-weight: 700;
    }
    
    .date-label {
        font-size: 0.6rem;
    }
    
    .time-selector {
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
        gap: 0.25rem;
        max-height: 120px;
        padding: 0.375rem;
        margin-bottom: 1rem;
    }
    
    .time-option {
        padding: 0.375rem 0.125rem;
        font-size: 0.65rem;
        min-height: 30px;
        border-radius: 4px;
    }
    
    .booking-form .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .booking-form .form-group label svg {
        width: 16px;
        height: 16px;
    }
    
    .booking-form .continue-btn {
        margin-top: 1.5rem;
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .plans-container {
        gap: 0.5rem;
    }
    
    .plan-card {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .plan-info h3 {
        font-size: 0.875rem;
    }
    
    .plan-info p {
        font-size: 0.7rem;
    }
    
    .plan-price {
        font-size: 1rem;
        align-self: flex-end;
    }
    
    .booking-summary {
        padding: 0.75rem;
    }
    
    .booking-summary h3 {
        font-size: 0.875rem;
    }
    
    .summary-row {
        font-size: 0.8rem;
    }
    
    .payment-info {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .payment-details h4 {
        font-size: 0.8rem;
    }
    
    .payment-details p {
        font-size: 0.7rem;
    }
    
    .amount {
        font-size: 1.4rem;
    }
    
    .pix-code-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .copy-btn {
        padding: 0.625rem;
        width: 100%;
        justify-content: center;
    }
    
    .success-container {
        padding: 1rem;
    }
    
    .success-container h2 {
        font-size: 1.125rem;
    }
    
    .success-container p {
        font-size: 0.8rem;
    }
    
    .location-modal {
        padding: 1.25rem;
    }
    
    .location-modal h2 {
        font-size: 1.125rem;
    }
    
    .modal-close {
        width: 26px;
        height: 26px;
        top: 6px;
        right: 6px;
    }
}

/* ===== SMALL MOBILE DEVICES (320px-360px) ===== */
@media (max-width: 360px) {
    .header {
        padding: 0.375rem 0.5rem;
        min-height: 44px;
    }
    
    .header-btn {
        width: 30px;
        height: 30px;
    }
    
    .header-logo {
        height: 20px;
    }
    
    .notification-badge {
        min-width: 12px;
        height: 12px;
        font-size: 0.6rem;
    }
    
    .location-bar {
        padding: 0.25rem 0.5rem;
        min-height: 32px;
    }
    
    .location-info {
        font-size: 0.7rem;
        gap: 0.25rem;
    }
    
    .main-content {
        padding: 0.25rem;
        min-height: calc(100vh - 76px);
        min-height: calc(100dvh - 76px);
        padding-top: 0.125rem;
        padding-bottom: 0.25rem;
    }
    
    .profile-content {
        padding: 6px;
    }
    
    .profile-name {
        font-size: 0.95rem;
    }
    
    .online-status {
        font-size: 0.6rem;
    }
    
    .audio-section,
    .profile-tagline,
    .values-section,
    .profile-stats,
    .profile-location,
    .profile-description {
        margin-bottom: 5px;
    }
    
    .audio-player {
        padding: 4px 6px;
        gap: 5px;
    }
    
    .play-btn {
        width: 18px;
        height: 18px;
    }
    
    .audio-waves {
        height: 12px;
        gap: 1px;
        padding: 0 2px;
    }
    
    .wave {
        width: 1px;
        max-width: 1.5px;
    }
    
    .audio-time {
        font-size: 0.6rem;
        min-width: 26px;
    }
    
    .stat-item {
        font-size: 0.6rem;
    }
    
    .stat-item svg {
        width: 10px;
        height: 10px;
    }
    
    .profile-description p {
        font-size: 0.7rem;
    }
    
    .profile-description p.collapsed {
        max-height: 2.8em;
    }
    
    .read-more-btn {
        font-size: 0.65rem;
    }
    
    .cta-button {
        padding: 9px;
        font-size: 0.8rem;
    }
    
    .cta-button svg {
        width: 16px;
        height: 16px;
    }
    
    /* MODAL ULTRA COMPACTO PARA MOBILE PEQUENO */
    .modal {
        padding: 0.125rem;
        align-items: flex-start;
        padding-top: 0.25rem;
    }
    
    .booking-modal {
        padding: 0.5rem;
        max-width: 98vw;
        max-height: 94vh;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .step-indicator {
        margin-bottom: 0.5rem;
        gap: 0.125rem;
    }
    
    .step {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .step-line {
        width: 10px;
    }
    
    .step-content h2 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 0.375rem;
    }
    
    .form-group label {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
        font-weight: 600;
        line-height: 1.2;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.375rem;
        font-size: 0.75rem;
    }
    
    .date-selector {
        grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
        gap: 0.25rem;
        max-height: 110px;
        padding: 0.25rem;
        margin-bottom: 0.75rem;
    }
    
    .date-option {
        padding: 0.375rem 0.125rem;
        min-height: 40px;
        border-radius: 4px;
    }
    
    .date-day {
        font-size: 0.6rem;
        margin-bottom: 0.0625rem;
        font-weight: 700;
    }
    
    .date-label {
        font-size: 0.55rem;
    }
    
    .time-selector {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 0.125rem;
        max-height: 90px;
        padding: 0.25rem;
        margin-bottom: 0.75rem;
    }
    
    .time-option {
        padding: 0.25rem 0.0625rem;
        font-size: 0.6rem;
        min-height: 24px;
        border-radius: 3px;
    }
    
    .booking-form .form-group label {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .booking-form .form-group label svg {
        width: 14px;
        height: 14px;
    }
    
    .booking-form .continue-btn {
        margin-top: 1rem;
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .continue-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .modal-close {
        top: 4px;
        right: 4px;
        width: 22px;
        height: 22px;
    }
}

/* ===== EXTRA SMALL DEVICES (max 320px) OTIMIZADO ===== */
@media (max-width: 320px) {
    .header {
        padding: 0.25rem 0.375rem;
        min-height: 40px;
    }
    
    .location-bar {
        padding: 0.25rem 0.375rem;
        min-height: 28px;
    }
    
    .main-content {
        padding: 0.125rem;
        min-height: calc(100vh - 68px);
        min-height: calc(100dvh - 68px);
    }
    
    .profile-content {
        padding: 5px;
    }
    
    .profile-header {
        margin-bottom: 4px;
    }
    
    .audio-section,
    .profile-tagline,
    .values-section,
    .profile-stats,
    .profile-location,
    .profile-description {
        margin-bottom: 4px;
    }
    
    .profile-description {
        margin-bottom: 6px;
    }
    
    .cta-button {
        padding: 8px;
        font-size: 0.75rem;
    }
    
    /* STEPONTENT1 ULTRA COMPACTO */
    .date-selector {
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
        gap: 0.125rem;
        max-height: 90px;
        padding: 0.125rem;
        margin-bottom: 0.5rem;
    }
    
    .date-option {
        padding: 0.25rem 0.0625rem;
        min-height: 35px;
        border-radius: 3px;
    }
    
    .date-day {
        font-size: 0.55rem;
        margin-bottom: 0.0625rem;
        font-weight: 700;
    }
    
    .date-label {
        font-size: 0.5rem;
    }
    
    .time-selector {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
        gap: 0.0625rem;
        max-height: 70px;
        padding: 0.125rem;
        margin-bottom: 0.5rem;
    }
    
    .time-option {
        padding: 0.1875rem 0.0625rem;
        font-size: 0.55rem;
        min-height: 20px;
        border-radius: 2px;
    }
    
    .booking-form .form-group label {
        font-size: 0.7rem;
        margin-bottom: 0.375rem;
    }
    
    .booking-form .form-group label svg {
        width: 12px;
        height: 12px;
    }
    
    .booking-form .continue-btn {
        margin-top: 0.75rem;
        padding: 0.625rem;
        font-size: 0.75rem;
    }
}

/* ===== MODAL RESPONSIVO PARA DIFERENTES ALTURAS ===== */
@media (max-height: 700px) {
    .booking-modal {
        max-height: 96vh;
    }
    
    .date-selector {
        max-height: 120px;
    }
    
    .time-selector {
        max-height: 100px;
    }
}

@media (max-height: 600px) {
    .booking-modal {
        max-height: 98vh;
        padding: 0.5rem;
    }
    
    .step-indicator {
        margin-bottom: 0.5rem;
    }
    
    .step-content h2 {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .date-selector {
        max-height: 100px;
    }
    
    .time-selector {
        max-height: 80px;
    }
    
    .continue-btn {
        margin-top: 0.5rem;
        padding: 0.5rem;
    }
}

@media (max-height: 500px) {
    .modal {
        padding: 0.0625rem;
        align-items: flex-start;
        padding-top: 0.125rem;
        height: 100vh;
        height: 100dvh;
    }
    
    .booking-modal {
        max-height: 98vh;
        padding: 0.375rem;
        overflow-y: auto;
    }
    
    .step-indicator {
        margin-bottom: 0.375rem;
        gap: 0.125rem;
    }
    
    .step {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    
    .step-line {
        width: 8px;
    }
    
    .step-content h2 {
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
    }
    
    .date-selector {
        max-height: 70px;
        gap: 0.125rem;
    }
    
    .time-selector {
        max-height: 50px;
        gap: 0.125rem;
        padding: 0.125rem;
    }
}

/* ===== LANDSCAPE MOBILE OTIMIZADO ===== */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 900px) {
    .modal {
        padding: 0.125rem;
        align-items: flex-start;
        padding-top: 0.125rem;
    }
    
    .booking-modal {
        max-height: 97vh;
        padding: 0.5rem;
        max-width: 420px;
    }
    
    .step-indicator {
        margin-bottom: 0.375rem;
        gap: 0.125rem;
    }
    
    .step {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .step-content h2 {
        font-size: 0.85rem;
        margin-bottom: 0.375rem;
    }
    
    .date-selector {
        grid-template-columns: repeat(4, 1fr);
        max-height: 60px;
        gap: 0.125rem;
    }
    
    .date-option {
        min-height: 30px;
        padding: 0.125rem;
    }
    
    .time-selector {
        grid-template-columns: repeat(6, 1fr);
        max-height: 45px;
        gap: 0.125rem;
    }
    
    .time-option {
        min-height: 18px;
        font-size: 0.55rem;
    }
    
    .continue-btn {
        padding: 0.375rem;
        margin-top: 0.375rem;
    }
}

/* ===== SAFE AREA SUPPORT ===== */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
    }
    
    .main-content {
        padding-left: max(0.375rem, env(safe-area-inset-left));
        padding-right: max(0.375rem, env(safe-area-inset-right));
        padding-bottom: max(0.375rem, env(safe-area-inset-bottom));
    }
    
    .modal {
        padding-left: max(0.25rem, env(safe-area-inset-left));
        padding-right: max(0.25rem, env(safe-area-inset-right));
        padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
    }
    
    @media (max-width: 480px) {
        .header {
            padding-top: max(0.375rem, env(safe-area-inset-top));
            padding-left: max(0.375rem, env(safe-area-inset-left));
            padding-right: max(0.375rem, env(safe-area-inset-right));
        }
        
        .main-content {
            padding-left: max(0.25rem, env(safe-area-inset-left));
            padding-right: max(0.25rem, env(safe-area-inset-right));
            padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
        }
    }
}

/* ===== HOVER STATES FOR DESKTOP ===== */
@media (hover: hover) {
    .header-btn:hover {
        background: #f5f5f5;
    }
    
    .photo-nav:hover {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .dot:hover {
        background: rgba(255, 255, 255, 0.8);
    }
    
    .play-btn:hover {
        transform: scale(1.05);
    }
    
    .main-value:hover {
        color: #FF5555;
    }
    
    .value-option:hover {
        background: rgba(255, 85, 85, 0.1);
    }
    
    .cta-button:hover {
        background: #ef4444;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 85, 85, 0.3);
    }
    
    .date-option:hover {
        border-color: #FF5555;
    }
    
    .time-option:hover {
        border-color: #FF5555;
    }
    
    .plan-card:hover {
        border-color: #FF5555;
    }
    
    .continue-btn:hover {
        background: #ef4444;
    }
    
    .back-btn:hover {
        background: #e5e7eb;
    }
    
    .copy-btn:hover {
        background: #f56551;
    }
    
    .whatsapp-btn:hover {
        background: #128c7e;
    }
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
.header-btn:focus,
.photo-nav:focus,
.play-btn:focus,
.date-option:focus,
.time-option:focus,
.plan-card:focus,
.continue-btn:focus,
.back-btn:focus,
.copy-btn:focus,
.whatsapp-btn:focus {
    outline: 2px solid #FF5555;
    outline-offset: 2px;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .profile-card {
        border: 2px solid #333;
    }
    
    .main-value,
    .stat-item,
    .profile-location,
    .profile-description p {
        color: #fff;
    }
    
    .audio-label,
    .profile-tagline {
        color: #ccc;
    }
    
    .date-option,
    .time-option,
    .plan-card {
        border-width: 2px;
    }
    
    .continue-btn,
    .cta-button {
        border: 2px solid #fff;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .location-bar,
    .photo-nav,
    .photo-dots,
    .audio-section,
    .cta-button,
    .modal,
    .loading-overlay {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
        background: white;
    }
    
    .profile-card {
        box-shadow: none;
        border: 1px solid #333;
        background: white;
        color: black;
    }
    
    .profile-content {
        color: black;
    }
    
    .profile-name,
    .stat-item,
    .profile-location,
    .profile-description p {
        color: black !important;
    }
}