/* Casino Comparator Pro - Frontend Styles - HrajBonus.com Light Edition */

/* Responsible Gambling Styling */
.responsible-gambling-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.age-restriction {
    background: #ff4757;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: bold;
    font-size: 14px;
}

.play-responsibly {
    color: #1e293b;
    font-weight: 600;
}

.responsible-gambling-actions {
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 71, 87, 0.2);
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.age-warning {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
    text-align: center;
    display: block;
}

.responsible-gambling-footer {
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    border: 1px solid #d1d5db;
    text-align: center;
}

.gambling-disclaimer h4 {
    margin: 0 0 16px 0;
    color: #dc2626;
    font-size: 18px;
    font-weight: 700;
}

.gambling-disclaimer p {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.gambling-disclaimer p:first-of-type {
    font-weight: 600;
    color: #dc2626;
    font-size: 16px;
}

.help-resources {
    margin-top: 20px;
    padding: 16px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
}

.help-resources a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
}

.help-resources a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .responsible-gambling-header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .responsible-gambling-footer {
        margin-top: 32px;
        padding: 24px 16px;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }
    
    .gambling-disclaimer h4 {
        font-size: 16px;
    }
    
    .gambling-disclaimer p {
        font-size: 13px;
    }
    
    .help-resources {
        padding: 12px;
        font-size: 13px;
    }
}

.casino-compare-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #1e293b;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Responsible Gambling Footer */
.responsible-gambling-footer {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border-left: 4px solid #6c757d;
}

.gambling-disclaimer h4 {
    color: #495057;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.gambling-disclaimer p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.gambling-disclaimer p:last-child {
    margin-bottom: 0;
    font-weight: 600;
}

/* Selector Section */
.casino-selector {
    margin-bottom: 30px;
}

.casino-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    margin-bottom: 48px;
    justify-content: center;
}

@media (max-width: 1024px) {
    .casino-cards {
        gap: 36px;
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .casino-cards {
        flex-direction: column;
        align-items: center;
        gap: 32px;
        text-align: center;
        width: 100%;
        padding: 0;
        margin: 0 auto 40px auto;
    }
}

/* REBUILT CASINO CARD - PERFECT LAYOUT */
.casino-card {
    /* Card styling */
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    
    /* Fixed dimensions */
    width: 340px;
    max-width: 100%;
    
    /* Layout */
    padding: 20px;
    text-align: center;
    
    /* Positioning context */
    position: relative;
    z-index: 2;
    
    /* Allow dropdown to overflow card */
    overflow: visible;
    
    /* Flex layout for content */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.casino-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

@media (max-width: 768px) {
    .casino-card {
        width: 100%;
        max-width: 320px;
        padding: 20px;
        text-align: center;
    }
}

/* COMPLETELY REBUILT CASINO CARD SYSTEM - NO OVERLAP GUARANTEED */

/* Casino logo container - completely isolated */
.casino-logo {
    /* Fixed dimensions - cannot change */
    width: 80px;
    height: 80px;
    /* Absolute containment */
    overflow: hidden;
    /* Perfect circle */
    border-radius: 50%;
    /* Center in card */
    margin: 0 auto 16px auto;
    /* Remove from document flow to prevent interference */
    display: block;
    position: relative;
    /* Prevent any size changes */
    flex: none;
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 80px;
    max-width: 80px;
    min-height: 80px;
    max-height: 80px;
    /* Background gradient for empty state */
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    /* Shadow */
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    /* Ensure it doesn't interfere with other elements */
    z-index: 1;
}

/* Content inside logo container */
.logo-placeholder {
    /* Fill the container completely */
    width: 80px;
    height: 80px;
    /* Absolute positioning within container */
    position: absolute;
    top: 0;
    left: 0;
    /* Prevent overflow */
    overflow: hidden;
    border-radius: 50%;
    /* Center any content */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Text for empty state (fallback) */
    color: white;
    font-weight: bold;
    font-size: 18px;
    /* Remove any margins/padding */
    margin: 0;
    padding: 0;
    /* No transforms or transitions that could cause issues */
    transform: none;
    transition: none;
    /* Background should be transparent since we're using the icon */
    background: transparent;
}

/* Images - completely contained */
.logo-placeholder img {
    /* Fill container exactly */
    width: 80px;
    height: 80px;
    /* Absolute positioning */
    position: absolute;
    top: 0;
    left: 0;
    /* Crop to fit circle */
    object-fit: cover;
    border-radius: 50%;
    /* Remove any spacing */
    margin: 0;
    padding: 0;
    /* Block display */
    display: block;
    /* Prevent any expansion */
    max-width: 80px;
    max-height: 80px;
    min-width: 80px;
    min-height: 80px;
}

/* REBUILT DROPDOWN SYSTEM - PROPER LAYERING */
.casino-select-wrapper {
    /* Positioning context for dropdown */
    position: relative;
    /* Full width within card */
    width: 100%;
    /* Remove any margins */
    margin: 0;
    /* Base z-index */
    z-index: 5;
}

.casino-select-wrapper.active {
    /* High z-index when dropdown is open */
    z-index: 1000;
    /* Ensure it's above everything else */
    position: relative;
}

.casino-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.casino-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #f9fafb;
}

.casino-search {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    background: #ffffff;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
}

.casino-search:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #f9fafb;
}

/* REBUILT DROPDOWN MENU - ALWAYS ON TOP */
.casino-dropdown {
    /* Absolute positioning relative to wrapper */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    
    /* Styling */
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Scrolling */
    max-height: 200px;
    overflow-y: auto;
    
    /* CRITICAL: Highest z-index to ensure it's always on top */
    z-index: 9999;
    
    /* Ensure it's above any other content */
    position: absolute;
}

.casino-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.casino-option:hover {
    background-color: #f3f4f6;
}

.casino-option:last-child {
    border-bottom: none;
}

.casino-option.empty {
    cursor: not-allowed;
    color: #9ca3af;
    background-color: #f9fafb;
}

.remove-card {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.remove-card:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Actions Section */
.casino-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin: 48px auto;
    text-align: center;
}

.casino-buttons {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.add-casino-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.add-casino-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.compare-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compare-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.compare-btn:disabled,
.compare-btn.is-disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.2);
}

.compare-btn.shake {
    animation: shake 0.6s;
}

@keyframes shake {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    90% { transform: translateX(4px); }
}

@media (max-width: 768px) {
    .casino-actions {
        flex-direction: column;
        gap: 24px;
        margin: 40px auto;
    }
    
    .casino-buttons {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        text-align: center;
    }
    
    .add-casino-btn,
    .compare-btn {
        width: 100%;
        max-width: 280px;
        padding: 16px;
        font-size: 16px;
    }
}

/* Comparison Table */
.casino-comparison-table {
    display: none;
    margin-top: 48px;
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
}

.casino-comparison {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 800px;
    background: #ffffff;
}

.casino-comparison th,
.casino-comparison td {
    padding: 16px 20px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.casino-comparison th {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    font-weight: 700;
    color: #1e293b;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #cbd5e1;
}

.casino-comparison th.attribute-column {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 15px;
    width: 180px;
    text-align: left;
    padding-left: 24px;
}

.casino-comparison td.attribute-label {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    font-weight: 600;
    color: #374151;
    text-align: left;
    padding-left: 24px;
    border-right: 2px solid #e2e8f0;
}

.casino-comparison td.casino-value {
    font-weight: 500;
    color: #4b5563;
}

.casino-comparison tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.casino-comparison tbody tr:nth-child(even) {
    background-color: rgba(248, 250, 252, 0.5);
}

.casino-comparison tbody tr:nth-child(even):hover {
    background-color: rgba(59, 130, 246, 0.08);
}

.casino-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

/* FIXED COMPARISON TABLE AVATARS */
.casino-avatar {
    /* Fixed dimensions - no overrides */
    width: 60px;
    height: 60px;
    min-width: 60px;
    max-width: 60px;
    min-height: 60px;
    max-height: 60px;
    
    /* Perfect circle with overflow containment */
    border-radius: 50%;
    overflow: hidden;
    
    /* Transparent background since we use custom icon */
    background: transparent;
    
    /* Center content */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Styling for fallback text only */
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin: 0 auto;
    
    /* Prevent any positioning issues */
    position: relative;
    flex-shrink: 0;
}

.casino-avatar img {
    /* Fill container exactly */
    width: 60px;
    height: 60px;
    /* Absolute positioning to prevent any sizing issues */
    position: absolute;
    top: 0;
    left: 0;
    /* Crop to fit */
    object-fit: cover;
    border-radius: 50%;
    /* Remove any margins */
    margin: 0;
    padding: 0;
    /* Block display */
    display: block;
}

.casino-header span {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
    text-align: center;
    line-height: 1.3;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

@media (max-width: 1024px) {
    .casino-comparison-table {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
    }
    
    .casino-comparison {
        min-width: 700px;
    }
    
    .casino-comparison th,
    .casino-comparison td {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .casino-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        max-width: 50px;
        min-height: 50px;
        max-height: 50px;
        font-size: 16px;
    }
    
    .casino-avatar img {
        width: 50px;
        height: 50px;
    }
    
    .casino-header span {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .casino-comparison-table {
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }
    
    .casino-comparison {
        min-width: 600px;
    }
    
    .casino-comparison th,
    .casino-comparison td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .casino-comparison th.attribute-column {
        width: 140px;
        padding-left: 16px;
        font-size: 13px;
    }
    
    .casino-comparison td.attribute-label {
        padding-left: 16px;
    }
    
    .casino-avatar {
        width: 45px;
        height: 45px;
        min-width: 45px;
        max-width: 45px;
        min-height: 45px;
        max-height: 45px;
        font-size: 14px;
    }
    
    .casino-avatar img {
        width: 45px;
        height: 45px;
    }
    
    .casino-header span {
        font-size: 12px;
    }
    
    .btn-primary {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Error Messages */
.casino-error {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #dc2626;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #fca5a5;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    font-size: 15px;
}

@media (max-width: 768px) {
    .casino-error {
        padding: 16px 20px;
        font-size: 14px;
        margin: 0 -16px 20px -16px;
        border-radius: 8px;
        text-align: center;
    }
}

/* Enhanced Mobile Responsiveness - Center Aligned */
@media (max-width: 768px) {
    .casino-compare-wrapper {
        padding: 16px;
        margin: 0 auto;
        border-radius: 12px;
        text-align: center;
    }
    
    .casino-selector {
        margin-bottom: 28px;
        text-align: center;
    }
    
    .casino-actions {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        text-align: center;
        margin-top: 32px;
        margin-bottom: 40px;
    }
    
    .casino-buttons {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
    }
    
    .casino-header {
        text-align: center;
    }
    
    .casino-header span {
        font-size: 13px;
        font-weight: 600;
    }
    
    .casino-select-wrapper {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .casino-compare-wrapper {
        padding: 12px;
        margin: 0;
        border-radius: 8px;
        text-align: center;
    }
    
    .casino-cards {
        gap: 12px;
        text-align: center;
    }
    
    .casino-card {
        padding: 16px;
        border-radius: 12px;
        text-align: center;
    }
    
    .casino-comparison {
        min-width: 640px;
    }
    
    .casino-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        min-height: 36px;
        max-height: 36px;
    }
    
    .casino-avatar img {
        width: 36px;
        height: 36px;
    }
    
    .casino-header span {
        font-size: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .casino-comparison {
        min-width: 400px;
    }
    
    .casino-comparison th,
    .casino-comparison td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .casino-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        max-width: 40px;
        min-height: 40px;
        max-height: 40px;
    }
    
    .casino-avatar img {
        width: 40px;
        height: 40px;
    }
}

/* Default casino icon and avatar styles */
.default-casino-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.casino-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    margin: 0 auto 8px auto;
}

.casino-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
