/**
 * Styles extracted from tarot/index.php.
 */

.is-hidden {
    display: none;
}

.tarot-page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tarot-hero-icon-wrap {
    display: inline-block;
}

.tarot-hero-icon {
    color: var(--accent-purple-mystic);
    font-size: 3em;
    margin-bottom: 10px;
}

.tarot-page-subtitle {
    color: var(--text-secondary);
}

.tarot-deck-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.tarot-deck-heading {
    font-size: 2.5em;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.tarot-deck-copy {
    color: var(--text-secondary);
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto;
}

.deck-item-centered {
    text-align: center;
}

.tarot-deck-title {
    font-family: var(--font-display);
    font-size: 1.5em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tarot-deck-description {
    color: var(--text-secondary);
    font-size: 0.95em;
    max-width: 300px;
    margin: 0 auto;
}

.cards-selected-count {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-gold);
}

.deck-header-spacer {
    width: 140px;
}

.tarot-loading-overlay {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.tarot-loading-spinner {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

.tarot-loading-copy {
    margin-top: 20px;
    color: var(--accent-gold);
    font-family: var(--font-display);
}

.tarot-question-overlay {
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.tarot-question-card {
    max-width: 550px;
    width: 90%;
    padding: 40px;
    position: relative;
}

.tarot-question-header {
    text-align: center;
    margin-bottom: 24px;
}

.tarot-question-icon {
    display: inline-flex;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(217, 70, 239, 0.15));
    border-radius: 50%;
    padding: 20px;
    margin-bottom: 16px;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.tarot-question-icon .icon {
    width: 36px;
    height: 36px;
    color: #d946ef;
}

.tarot-question-header h3 {
    color: var(--accent-gold);
    font-family: var(--font-display);
    font-size: 1.8em;
    margin: 0 0 12px;
}

.tarot-question-header p {
    color: var(--text-secondary);
    font-size: 1.05em;
    line-height: 1.6;
}

.tarot-question-input {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
    transition: border-color 0.3s;
}

.tarot-question-input:focus {
    border-color: rgba(139, 92, 246, 0.6);
    outline: none;
}

.tarot-char-count {
    color: var(--text-tertiary);
    font-size: 0.85em;
    margin-bottom: 24px;
    text-align: right;
}

.tarot-char-count.is-warning {
    color: var(--accent-wine);
}

.tarot-question-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.tarot-question-skip {
    flex: 1;
    padding: 14px;
}

.tarot-question-confirm {
    flex: 2;
    padding: 14px;
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
}

.tarot-question-hint {
    margin-top: 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9em;
}

.tarot-question-hint .icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* Deck Selection Styles */
        .tarot-step { display: none; margin-top: 20px; padding-bottom: 60px; }
        .tarot-step.active { display: block; }

        .tarot-inline-status {
            max-width: 620px;
            margin: -18px auto 28px;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid rgba(239, 68, 68, 0.28);
            background: rgba(239, 68, 68, 0.12);
            color: #fecaca;
            font-size: 0.92rem;
            line-height: 1.4;
            text-align: center;
        }

        .tarot-inline-status[hidden] {
            display: none;
        }
        
        .deck-selection-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr); /* Always 2 columns */
            gap: 40px;
            justify-content: center;
            margin-top: 60px;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }
        
        @media (max-width: 768px) {
            .deck-selection-grid {
                grid-template-columns: repeat(2, 1fr); /* Keep 2 columns side by side */
                gap: 20px;
                margin-top: 30px;
                padding: 0 10px;
            }
            
            .deck-item {
                font-size: 0.9rem;
            }
            
            .deck-content-below h3 {
                font-size: 1.1rem !important;
            }
            
            .deck-content-below p {
                font-size: 0.8rem !important;
            }
        }
        
        .deck-item {
            cursor: pointer;
            transition: transform 0.4s ease;
        }

        .deck-item:hover {
            transform: translateY(-10px);
        }
        
        .deck-image-container {
            width: 100%;
            aspect-ratio: 2/3; /* Standard Tarot Aspect Ratio */
            border-radius: var(--radius-xl);
            overflow: hidden;
            box-shadow: var(--shadow-elevated);
            border: 1px solid rgba(199, 164, 74, 0.3);
            margin-bottom: 25px;
            position: relative;
            background: rgba(0,0,0,0.2);
        }

        .deck-img-full {
            width: 100%;
            height: 100%;
            object-fit: cover; /* Use cover now that container is card-shaped */
            transition: transform 0.6s ease;
        }

        .deck-item:hover .deck-img-full {
            transform: scale(1.05);
        }

        .deck-content-below {
            animation: fadeInUp 0.5s ease;
        }
        
        /* Removed old styles mostly, kept structure clean */

        /* Card Selection Styles */
        .step-header-modern {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        .instruction-box {
            text-align: center;
            min-width: 300px;
        }
        
        .deck-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 12px;
            perspective: 1000px;
            max-width: 1100px;
            margin: 0 auto;
        }
        
        /* 3D Card Styles */
        .card-container {
            width: 100%;
            aspect-ratio: 2/3;
            perspective: 1000px;
            cursor: pointer;
        }
        
        .card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            transform-style: preserve-3d;
        }
        
        .card-container.selected .card-inner {
            transform: rotateY(180deg);
        }
        
        .card-face {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 8px;
            border: 1px solid rgba(199, 164, 74, 0.3);
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            overflow: hidden;
        }
        
        .card-front {
            background-color: #1a1a2e;
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .card-back-face {
            transform: rotateY(180deg);
            background: #fff;
            border: 2px solid var(--accent-gold);
            box-shadow: 0 0 15px rgba(199, 164, 74, 0.5);
        }
        
        .card-back-face img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* Deck Backgrounds */
        .deck-grid[data-deck="riderwaite"] .card-front {
            background-image: url('../assets/images/tarot/riderwaite/baralho-fundo.webp');
        }
        
        .deck-grid[data-deck="lenormand"] .card-front {
            background-image: url('../assets/images/tarot/lenormand/baralho-fundo.webp');
        }
        
        .card-container:hover .card-inner {
            transform: translateY(-10px);
        }
        
        .card-container.selected:hover .card-inner {
            transform: rotateY(180deg) translateY(-10px);
        }

        @media (max-width: 600px) {
            .step-header-modern { 
                justify-content: center;
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
            }
            
            .deck-grid { 
                grid-template-columns: repeat(8, 1fr) !important;
                gap: 4px;
                max-width: 100%;
                padding: 0 4px;
            }
            
            .card-container {
                width: 100%;
                height: auto;
                min-height: auto;
                aspect-ratio: 85 / 130;
            }
            
            .instruction-box {
                min-width: auto;
                width: 100%;
            }
        }

