/* UNIQR V2 - Custom Styles */
/* Additional custom styles and overrides */

/* ============================================
   TABLE RESPONSIVE WRAPPERS
   ============================================ */

/* Ensure all tables are wrapped for horizontal scrolling on mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.brutal-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border: 3px solid #000;
    background: #fff;
}

/* Table base styles */
.brutal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

/* On mobile, ensure minimum width for readability */
@media (max-width: 768px) {
    .brutal-table {
        min-width: 600px;
    }

    /* Alternative: Stack table rows as cards on very small screens */
    .brutal-table.mobile-card-view {
        min-width: 100%;
    }

    .brutal-table.mobile-card-view thead {
        display: none;
    }

    .brutal-table.mobile-card-view tbody,
    .brutal-table.mobile-card-view tr {
        display: block;
        margin-bottom: 15px;
        border: 3px solid #000;
    }

    .brutal-table.mobile-card-view td {
        display: block;
        text-align: left;
        padding: 10px 15px;
        border-bottom: 1px solid #e0e0e0;
        position: relative;
        padding-left: 50%;
    }

    .brutal-table.mobile-card-view td:last-child {
        border-bottom: none;
    }

    .brutal-table.mobile-card-view td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: 900;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #666;
    }
}

/* ============================================
   PREVENT HORIZONTAL OVERFLOW
   ============================================ */

/* Global overflow prevention */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure all major containers don't overflow horizontally */
.container,
.container-fluid,
.row {
    max-width: 100%;
    overflow-x: hidden;
}

/* Brutal cards need visible overflow for proper content flow */
.brutal-card {
    max-width: 100%;
    /* Don't set overflow hidden - causes scroll issues on mobile */
}

/* Admin content area */
.admin-content {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .admin-content {
        padding: 10px !important;
    }
}

/* Rating notification bubble (bottom-right) - Neobrutalist Style */
.rating-notif {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 340px;
    max-width: calc(100% - 40px);
    background: var(--secondary, #E8F5E9);
    border: 4px solid var(--primary);
    border-radius: 0;
    box-shadow: 8px 8px 0 var(--primary);
    z-index: 2000;
    padding: 0;
    display: none;
    font-family: 'Courier Prime', monospace;
    overflow: hidden;
}

.rating-notif-header {
    background: var(--accent-yellow, #FFE500);
    padding: 12px 16px;
    border-bottom: 4px solid var(--primary);
    position: relative;
}

.rating-notif h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rating-notif-body {
    padding: 16px;
}

.rating-notif p {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.rating-emojis {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

.rating-emojis a,
.rating-emojis button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: var(--white, #fff);
    border: 3px solid var(--primary);
    text-decoration: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 3px 3px 0 var(--primary);
}

.rating-emojis a:hover,
.rating-emojis button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--primary);
}

.rating-emojis a:active,
.rating-emojis button:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 var(--primary);
}

.rating-emojis button.selected {
    background: var(--accent-yellow, #FFE500);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--primary);
}

.rating-feedback-container textarea {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 3px solid var(--primary);
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    resize: none;
    background: var(--white, #fff);
    box-shadow: 3px 3px 0 var(--primary);
}

.rating-feedback-container textarea:focus {
    outline: none;
    box-shadow: 5px 5px 0 var(--primary);
    transform: translate(-1px, -1px);
}

.rating-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: space-between;
}

.rating-actions .btn,
.rating-feedback-container .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    border-radius: 0;
    border: 3px solid var(--primary);
    background: var(--primary);
    color: var(--accent-yellow, #FFE500);
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
    font-family: 'Courier Prime', monospace;
}

.rating-actions .btn:hover,
.rating-feedback-container .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.3);
}

.rating-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    color: var(--accent-yellow, #FFE500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.rating-close:hover {
    background: var(--accent-red, #FF5252);
    color: var(--white, #fff);
}

/* Success state */
.rating-notif.success .rating-notif-header {
    background: var(--accent-green, #4CAF50);
}

.rating-notif.success .rating-notif-header h4 {
    color: var(--white, #fff);
}

@media (max-width: 480px) {
    .rating-notif {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .rating-emojis a,
    .rating-emojis button {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    
    .rating-emojis {
        gap: 6px;
    }
}