/* Business Details Modal Responsive Styles */

/* ===== BUSINESS DETAILS MODAL STYLES ===== */
.business-details-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.business-details-modal .modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.business-details-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.business-details-modal .modal-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.business-details-modal .modal-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
    font-weight: 400;
}

.business-details-modal .close {
    position: absolute;
    right: 25px;
    top: 20px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.business-details-modal .close:hover {
    opacity: 1;
    transform: scale(1.1) rotate(90deg);
    background: rgba(255, 255, 255, 0.2);
}

.business-details-modal .modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: calc(95vh - 200px);
}

.business-details-modal .business-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

/* Left Column - Business Information */
.business-details-modal .business-info-section {
    padding: 35px;
    border-right: 1px solid #e8ecf4;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.business-details-modal .info-group {
    margin-bottom: 30px;
}

.business-details-modal .info-group h3 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.business-details-modal .info-group h3::before {
    content: "📋";
    font-size: 18px;
}

.business-details-modal .info-group:nth-child(2) h3::before {
    content: "📝";
}

.business-details-modal .info-group:nth-child(3) h3::before {
    content: "👤";
}

.business-details-modal .info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.business-details-modal .info-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

.business-details-modal .info-item strong {
    color: #4a5568;
    display: inline-block;
    width: 130px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.business-details-modal .info-item span {
    color: #2d3748;
    font-size: 15px;
    line-height: 1.5;
    flex: 1;
    word-break: break-word;
}

.business-details-modal #modal-business-description {
    color: #4a5568;
    line-height: 1.7;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 20px;
    border-radius: 10px;
    min-height: 80px;
    border: 1px solid #e2e8f0;
    font-size: 15px;
}

/* Status Badge Styling */
.business-details-modal #modal-business-status {
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.business-details-modal #modal-business-status.status-pending {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
    border: 2px solid #fb923c;
}

.business-details-modal #modal-business-status.status-approved {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
    color: #14532d;
    border: 2px solid #22c55e;
}

.business-details-modal #modal-business-status.status-rejected {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #7f1d1d;
    border: 2px solid #ef4444;
}

/* Right Column - Media Gallery */
.business-details-modal .business-media-section {
    padding: 35px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
}

.business-details-modal .business-media-section h3 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.business-details-modal .business-media-section h3::before {
    content: "🖼️";
    font-size: 18px;
}

.business-details-modal .media-main-display {
    margin-bottom: 25px;
}

.business-details-modal #main-media-container {
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.business-details-modal #main-media-container:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6edff 100%);
}

.business-details-modal #main-media-container img,
.business-details-modal #main-media-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.business-details-modal .media-thumbnails h4 {
    color: #4a5568;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.business-details-modal .media-thumbnails h4::before {
    content: "🔗";
    font-size: 14px;
}

.business-details-modal #media-thumbnails-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(102, 126, 234, 0.02);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.business-details-modal .media-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.business-details-modal .media-thumbnail:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.business-details-modal .media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Action Buttons */
.business-details-modal .modal-actions {
    padding: 25px 35px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.business-details-modal .btn {
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.business-details-modal .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.business-details-modal .btn:hover::before {
    left: 100%;
}

.business-details-modal .btn-outline {
    border: 2px solid #6c757d;
    background: white;
    color: #6c757d;
}

.business-details-modal .btn-outline:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.business-details-modal .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.business-details-modal .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
}

.business-details-modal .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.business-details-modal .btn-success:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.4);
}

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

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .business-details-modal .modal-content {
        max-width: 1400px;
    }
    
    .business-details-modal .business-info-section,
    .business-details-modal .business-media-section {
        padding: 40px;
    }
    
    .business-details-modal #main-media-container {
        height: 400px;
    }
}

/* Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .business-details-modal .modal-content {
        width: 90%;
        max-width: 1100px;
    }
    
    .business-details-modal .business-info-section,
    .business-details-modal .business-media-section {
        padding: 30px;
    }
}

/* Tablet Landscape (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .business-details-modal .modal-content {
        width: 95%;
        max-width: 900px;
        margin: 1% auto;
    }
    
    .business-details-modal .business-details-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .business-details-modal .business-info-section {
        border-right: none;
        border-bottom: 1px solid #e8ecf4;
        padding: 25px;
    }
    
    .business-details-modal .business-media-section {
        padding: 25px;
    }
    
    .business-details-modal #main-media-container {
        height: 280px;
    }
    
    .business-details-modal .modal-header {
        padding: 20px 25px;
    }
    
    .business-details-modal .modal-header h2 {
        font-size: 22px;
    }
    
    .business-details-modal .close {
        right: 20px;
        top: 15px;
        font-size: 28px;
    }
    
    .business-details-modal .modal-actions {
        padding: 20px 25px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .business-details-modal .btn {
        flex: 1;
        min-width: 140px;
    }
}

/* Mobile Landscape and Small Tablets (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .business-details-modal .modal-content {
        width: 98%;
        max-width: 100%;
        margin: 1% auto;
        max-height: 98vh;
        border-radius: 8px;
    }
    
    .business-details-modal .business-details-content {
        grid-template-columns: 1fr;
    }
    
    .business-details-modal .business-info-section,
    .business-details-modal .business-media-section {
        padding: 20px;
    }
    
    .business-details-modal .business-info-section {
        border-right: none;
        border-bottom: 1px solid #e8ecf4;
    }
    
    .business-details-modal .info-group {
        margin-bottom: 25px;
    }
    
    .business-details-modal .info-group h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .business-details-modal .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 0;
    }
    
    .business-details-modal .info-item strong {
        width: auto;
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .business-details-modal .info-item span {
        font-size: 14px;
    }
    
    .business-details-modal #main-media-container {
        height: 240px;
    }
    
    .business-details-modal .modal-header {
        padding: 18px 20px;
    }
    
    .business-details-modal .modal-header h2 {
        font-size: 20px;
    }
    
    .business-details-modal .modal-header p {
        font-size: 14px;
    }
    
    .business-details-modal .close {
        right: 15px;
        top: 12px;
        font-size: 26px;
        width: 35px;
        height: 35px;
    }
    
    .business-details-modal .modal-actions {
        padding: 18px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .business-details-modal .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 13px;
    }
    
    .business-details-modal #media-thumbnails-container {
        max-height: 160px;
    }
    
    .business-details-modal .media-thumbnail {
        width: 60px;
        height: 60px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .business-details-modal {
        padding: 0;
    }
    
    .business-details-modal .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .business-details-modal .modal-header {
        padding: 15px 20px;
        border-radius: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .business-details-modal .modal-header h2 {
        font-size: 18px;
        line-height: 1.3;
    }
    
    .business-details-modal .modal-header p {
        font-size: 13px;
        margin-top: 5px;
    }
    
    .business-details-modal .close {
        right: 15px;
        top: 10px;
        font-size: 24px;
        width: 32px;
        height: 32px;
    }
    
    .business-details-modal .modal-body {
        max-height: none;
        overflow-y: visible;
    }
    
    .business-details-modal .business-details-content {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .business-details-modal .business-info-section,
    .business-details-modal .business-media-section {
        padding: 16px;
    }
    
    .business-details-modal .business-info-section {
        border-right: none;
        border-bottom: 1px solid #e8ecf4;
    }
    
    .business-details-modal .info-group {
        margin-bottom: 20px;
    }
    
    .business-details-modal .info-group h3 {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .business-details-modal .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0;
        margin-bottom: 12px;
    }
    
    .business-details-modal .info-item:hover {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .business-details-modal .info-item strong {
        width: auto;
        font-size: 12px;
        color: #667eea;
        margin-bottom: 2px;
    }
    
    .business-details-modal .info-item span {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .business-details-modal #modal-business-description {
        padding: 15px;
        font-size: 14px;
        line-height: 1.6;
        min-height: 60px;
    }
    
    .business-details-modal .business-media-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .business-details-modal #main-media-container {
        height: 200px;
        border-radius: 8px;
    }
    
    .business-details-modal .media-thumbnails h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .business-details-modal #media-thumbnails-container {
        max-height: 120px;
        gap: 8px;
        padding: 6px;
    }
    
    .business-details-modal .media-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .business-details-modal .modal-actions {
        padding: 15px 16px;
        background: #ffffff;
        border-top: 1px solid #e8ecf4;
        position: sticky;
        bottom: 0;
        flex-direction: column;
        gap: 10px;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .business-details-modal .btn {
        width: 100%;
        padding: 16px 20px;
        font-size: 14px;
        font-weight: 700;
        border-radius: 6px;
    }
    
    /* Reorder buttons for mobile */
    .business-details-modal #approve-business-btn {
        order: 1;
    }
    
    .business-details-modal #reject-business-btn {
        order: 2;
    }
    
    .business-details-modal .btn-outline {
        order: 3;
        margin-top: 5px;
        background: transparent;
        color: #6c757d;
        border: 1px solid #6c757d;
    }
}

/* Very Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .business-details-modal .modal-header {
        padding: 12px 15px;
    }
    
    .business-details-modal .modal-header h2 {
        font-size: 16px;
    }
    
    .business-details-modal .modal-header p {
        font-size: 12px;
    }
    
    .business-details-modal .close {
        right: 12px;
        top: 8px;
        font-size: 22px;
        width: 30px;
        height: 30px;
    }
    
    .business-details-modal .business-info-section,
    .business-details-modal .business-media-section {
        padding: 12px;
    }
    
    .business-details-modal .info-group h3 {
        font-size: 15px;
    }
    
    .business-details-modal .info-item strong {
        font-size: 11px;
    }
    
    .business-details-modal .info-item span {
        font-size: 13px;
    }
    
    .business-details-modal #main-media-container {
        height: 180px;
    }
    
    .business-details-modal .media-thumbnail {
        width: 45px;
        height: 45px;
    }
    
    .business-details-modal .modal-actions {
        padding: 12px;
    }
    
    .business-details-modal .btn {
        padding: 14px 16px;
        font-size: 13px;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .business-details-modal .modal-content {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .business-details-modal .business-info-section {
        background: linear-gradient(135deg, #1e1e1e 0%, #1a1a1a 100%);
        border-right-color: #333333;
    }
    
    .business-details-modal .business-media-section {
        background: linear-gradient(135deg, #1a1a1a 0%, #1e1e1e 100%);
    }
    
    .business-details-modal .info-group h3 {
        color: #ffffff;
        border-bottom-color: #667eea;
    }
    
    .business-details-modal .info-item {
        border-bottom-color: #333333;
    }
    
    .business-details-modal .info-item:hover {
        background-color: rgba(102, 126, 234, 0.1);
    }
    
    .business-details-modal .info-item strong {
        color: #cccccc;
    }
    
    .business-details-modal .info-item span {
        color: #ffffff;
    }
    
    .business-details-modal #modal-business-description {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
        color: #cccccc;
        border-color: #333333;
    }
    
    .business-details-modal #main-media-container {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
        border-color: #444444;
    }
    
    .business-details-modal #main-media-container:hover {
        border-color: #667eea;
        background: linear-gradient(135deg, #2e2e3e 0%, #252530 100%);
    }
    
    .business-details-modal #media-thumbnails-container {
        background: rgba(102, 126, 234, 0.05);
        border-color: #333333;
    }
    
    .business-details-modal .media-thumbnail {
        background: #2a2a2a;
        border-color: transparent;
    }
    
    .business-details-modal .media-thumbnail:hover {
        border-color: #667eea;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    }
    
    .business-details-modal .modal-actions {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
        border-top-color: #333333;
    }
    
    .business-details-modal .btn-outline {
        border-color: #cccccc;
        background: #1a1a1a;
        color: #cccccc;
    }
    
    .business-details-modal .btn-outline:hover {
        background: #cccccc;
        color: #1a1a1a;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .business-details-modal {
        position: static !important;
        background: white !important;
        backdrop-filter: none !important;
    }
    
    .business-details-modal .modal-content {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }
    
    .business-details-modal .modal-header {
        background: #f8f9fa !important;
        color: #000 !important;
        print-color-adjust: exact;
    }
    
    .business-details-modal .close {
        display: none !important;
    }
    
    .business-details-modal .modal-actions {
        display: none !important;
    }
    
    .business-details-modal .business-details-content {
        grid-template-columns: 1fr !important;
    }
    
    .business-details-modal .business-info-section {
        border-right: none !important;
        border-bottom: none !important;
    }
    
    .business-details-modal .business-media-section {
        page-break-before: always;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.business-details-modal .close:focus,
.business-details-modal .btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.business-details-modal .info-item:focus-within {
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.business-details-modal .media-thumbnail,
.business-details-modal #main-media-container img,
.business-details-modal #main-media-container video {
    will-change: transform;
}

.business-details-modal .btn {
    will-change: transform, box-shadow;
}

/* ===== ANIMATION PREFERENCES ===== */
@media (prefers-reduced-motion: reduce) {
    .business-details-modal {
        animation: none;
    }
    
    .business-details-modal .modal-content {
        animation: none;
    }
    
    .business-details-modal .close,
    .business-details-modal .btn,
    .business-details-modal .media-thumbnail,
    .business-details-modal .info-item {
        transition: none;
    }
    
    .business-details-modal .btn::before {
        display: none;
    }
}
