/**
 * Dashboard Components CSS
 *
 * Shared styles for dashboard cards, modals, badges and buttons
 *
 * @package Falscript
 * @version 1.0.0
 */

/* =============================================
   Fal Türü Cards
   ============================================= */
.fal-turu-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.fal-turu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.fal-turu-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
}

.fal-turu-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fal-badge {
    position: absolute;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(4px);
}

.price-badge {
    left: 10px;
}

.duration-badge {
    right: 10px;
}

.fal-turu-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fal-turu-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.fal-turu-desc {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex: 1;
}

/* =============================================
   Falcı Cards
   ============================================= */
.falci-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.falci-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.falci-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.falci-card-modern:hover::before {
    opacity: 1;
}

.falci-card-header {
    padding: 2rem;
    background: white;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.falci-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.falci-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.falci-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.falci-header-info {
    flex: 1;
    min-width: 0;
}

.falci-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.falci-company {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.falci-rating {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.falci-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.falci-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.stat-item:hover .text-success,
.stat-item:hover .text-warning,
.stat-item:hover .text-secondary {
    color: white !important;
}

.stat-item i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.stat-item:hover i {
    color: white;
}

.stat-item:hover i.text-success,
.stat-item:hover i.text-warning,
.stat-item:hover i.text-secondary {
    color: white !important;
}

.stat-item span {
    font-size: 0.8rem;
    font-weight: 500;
}

.falci-services {
    flex: 1;
}

.services-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-badge {
    background: #e7f3ff;
    color: #0066cc;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.service-badge:hover {
    background: #0066cc;
    color: white;
    transform: translateY(-2px);
}

.service-badge.more {
    background: #f8f9fa;
    color: #6c757d;
}

.falci-card-footer {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.falci-card-footer .btn {
    width: 100%;
    padding: 0.75rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.falci-card-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.falci-card-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(107, 70, 193, 0.3);
}

/* =============================================
   Rating Stars
   ============================================= */
.rating-stars,
.rating-stars-sm,
.rating-stars-lg {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #ffc107;
}

.rating-stars i,
.rating-stars-sm i,
.rating-stars-lg i {
    color: #ffc107;
}

.rating-stars {
    font-size: 0.9rem;
}

.rating-stars-sm {
    font-size: 0.7rem;
}

.rating-stars-lg {
    font-size: 1.2rem;
}

.rating-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.rating-text.no-reviews {
    color: #adb5bd;
    font-style: italic;
}

/* =============================================
   Modal Styles
   ============================================= */
.selected-info-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
}

.price-badge-sm {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tellers-list,
.fortune-types-list {
    padding-right: 5px;
}

.tellers-list::-webkit-scrollbar,
.fortune-types-list::-webkit-scrollbar {
    width: 6px;
}

.tellers-list::-webkit-scrollbar-track,
.fortune-types-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tellers-list::-webkit-scrollbar-thumb,
.fortune-types-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.tellers-list::-webkit-scrollbar-thumb:hover,
.fortune-types-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.teller-compact-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.teller-compact-card:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.teller-compact-card.selected {
    background: #e7f3ff;
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.teller-compact-card.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
}

.teller-compact-card.unavailable:hover {
    transform: none;
    background: white;
    border-color: #e9ecef;
}

.teller-avatar-sm {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.teller-avatar-sm .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-indicator-sm {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.status-indicator-sm.online {
    background: #28a745;
    animation: pulse-sm 2s infinite;
}

.status-indicator-sm.offline {
    background: #dc3545;
}

@keyframes pulse-sm {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.teller-name-compact {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.availability-badge-sm .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.bg-success-soft {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.bg-danger-soft {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Fortune Type Items */
.fortune-type-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fortune-type-item:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.fortune-type-item:last-child {
    margin-bottom: 0;
}

.fortune-type-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
}

.fortune-type-item.selected {
    background: #e7f3ff !important;
    border-color: var(--primary-color) !important;
    transform: translateX(3px);
}

.fortune-type-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    background: #e7f3ff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    display: inline-block;
}

/* Session Type Selection */
.session-type-card,
.session-type-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.session-type-label {
    display: block;
    padding: 1.25rem;
    text-align: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.session-type-card:hover .session-type-label,
.session-type-option:hover .session-type-label {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.session-type-card.selected .session-type-label,
.session-type-option.selected .session-type-label {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.session-type-label i {
    font-size: 1.75rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.session-type-label span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
}

/* Summary Cards */
.selected-summary-card {
    background: #e8f5e9;
    border-radius: 15px;
    border: 2px solid #4caf50;
}

.selected-summary {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 6px;
}

.selected-teller-info {
    border-left: 3px solid var(--primary-color);
}

/* =============================================
   Filter Cards
   ============================================= */
.filters-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
}

.filters-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.filter-group {
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

/* =============================================
   Status Filter Buttons
   ============================================= */
.status-filters {
    margin-bottom: 2rem;
}

.status-filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
}

.status-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-btn:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.status-btn.active i {
    color: white !important;
}

.status-btn i {
    font-size: 1rem;
}

.status-count {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.status-btn.active .status-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.status-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 991px) {
    .filters-card {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .falci-card-header {
        padding: 1.5rem;
    }

    .falci-avatar {
        width: 60px;
        height: 60px;
    }

    .falci-name {
        font-size: 1.1rem;
    }

    .falci-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }

    .stat-item {
        padding: 0.5rem 0.25rem;
    }

    .stat-item i {
        font-size: 1.2rem;
    }

    .stat-item span {
        font-size: 0.7rem;
    }

    .status-filter-buttons {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .status-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .status-count {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }

    .modal-dialog.modal-lg {
        max-width: 100%;
        margin: 0;
    }

    .modal-content {
        border-radius: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 0.75rem;
    }

    .selected-info-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .selected-info-card h6 {
        font-size: 0.9rem;
    }

    #sessionTypeSection {
        padding: 0.75rem !important;
    }

    .col-6 {
        padding: 0.25rem;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .modal-content {
        height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        padding: 1rem;
    }

    .fortune-types-list {
        max-height: calc(100vh - 350px) !important;
    }

    .fortune-type-item {
        padding: 0.6rem;
    }

    .fortune-type-name {
        font-size: 0.9rem;
    }

    .fortune-type-price {
        font-size: 0.85rem;
        padding: 0.2rem 0.5rem;
    }

    .session-type-label {
        padding: 0.5rem;
    }

    .session-type-label i {
        font-size: 1rem;
    }

    .session-type-label span {
        font-size: 0.8rem;
    }

    .selected-summary {
        padding: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .status-filter-buttons {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .status-btn {
        flex: 1 1 calc(50% - 0.25rem);
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        justify-content: center;
    }

    .status-btn i {
        font-size: 0.9rem;
    }

    .status-count {
        font-size: 0.75rem;
        padding: 0.15rem 0.4rem;
        min-width: 25px;
    }
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.falci-item {
    transition: all 0.3s ease;
}

.falci-item.hidden {
    display: none !important;
}
