/* AI Tarot Reader - Public Styles */

.ai-tarot-reader-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.tarot-header {
    text-align: center;
    margin-bottom: 40px;
}

.tarot-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.tarot-header p {
    font-size: 16px;
    color: #7f8c8d;
}

.reading-info {
    font-weight: 600;
    color: #8e44ad;
}

/* Steps */
.tarot-step {
    min-height: 400px;
}

.tarot-step.hidden {
    display: none;
}

/* Selection Step */
.selection-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.selection-group h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #34495e;
}

.option-grid {
    display: grid;
    gap: 15px;
}

.option-card {
    padding: 20px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.option-card:hover {
    border-color: #8e44ad;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.1);
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: #8e44ad;
    background: #f8f4fc;
}

.option-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2c3e50;
}

.option-card p {
    margin: 0;
    font-size: 14px;
    color: #7f8c8d;
}

.card-count {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    background: #8e44ad;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Question Input */
.question-container {
    max-width: 700px;
    margin: 30px auto 20px;
    text-align: center;
    display: block !important;
    visibility: visible !important;
}

.question-container h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #34495e;
    font-weight: 600;
}

.question-input {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.3s ease;
    background: #fff;
    color: #2c3e50;
    box-sizing: border-box;
    display: block;
}

.question-input:focus {
    outline: none;
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

.question-input::placeholder {
    color: #95a5a6;
    font-style: italic;
}

.character-count {
    text-align: right;
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
    display: block;
}

.character-count span {
    font-weight: 600;
    color: #8e44ad;
}

/* Actions */
/* Disclaimer Container */
.disclaimer-container {
    margin: 30px auto 20px;
    max-width: 600px;
}

.disclaimer-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.disclaimer-checkbox:hover {
    background: #e9ecef;
    border-color: #8e44ad;
}

.disclaimer-checkbox input[type="checkbox"] {
    margin: 3px 12px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.disclaimer-text {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
}

.disclaimer-text a {
    color: #8e44ad;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.disclaimer-text a:hover {
    color: #732d91;
    text-decoration: underline;
}

.tarot-actions {
    text-align: center;
    margin-top: 30px;
}

.tarot-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.tarot-button.primary {
    background: #8e44ad;
    color: #fff;
}

.tarot-button.primary:hover:not(:disabled) {
    background: #732d91;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.tarot-button.primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.tarot-button.secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.tarot-button.secondary:hover {
    background: #bdc3c7;
}

.tarot-button .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

/* Drawing Animation */
.drawing-animation {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    border: 4px solid #ecf0f1;
    border-top-color: #8e44ad;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.drawing-message {
    font-size: 18px;
    color: #7f8c8d;
    font-style: italic;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Cards Display */
.cards-display-wrapper {
    margin-bottom: 40px;
}

.spread-title {
    text-align: center;
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.cards-display {
    position: relative;
    min-height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 80px 40px 60px 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Single Card Layout */
.cards-display.layout-single {
    min-height: 480px;
    padding: 60px 40px;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.cards-display.layout-single .tarot-card {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0;
    /* Single card gets a generous display size */
    width: 220px !important;
    height: 360px !important;
}

/* Three Card Layout */
.cards-display.layout-horizontal {
    gap: 30px;
    min-height: 450px;
    flex-wrap: nowrap;
    padding: 60px 40px;
}

.cards-display.layout-horizontal .tarot-card {
    position: static;
    transform: none !important;
    flex-shrink: 0;
    /* Give horizontal cards more breathing room than the default 140×220 */
    width: 160px !important;
    height: 260px !important;
}

/* Celtic Cross Layout */
.cards-display.layout-celtic-cross {
    min-height: 750px;
    padding: 100px 80px 80px 80px;
    display: block;
}

/* Grid Layout */
.cards-display.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    min-height: 500px;
    padding: 60px 40px;
}

.cards-display.layout-grid .tarot-card {
    position: static;
    transform: none !important;
}

/* Custom Spread Layout (Grid-based positioning) */
.cards-display.layout-custom {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(5, auto);
    gap: 20px;
    min-height: 500px;
    padding: 60px 40px;
    justify-items: center;
    align-items: center;
}

.cards-display.layout-custom .tarot-card {
    position: static;
    transform: none !important;
}

/* Card Sizing */
.tarot-card {
    position: absolute;
    width: 140px;
    height: 220px;
    opacity: 0;
    transition: all 0.5s ease;
}

.tarot-card.show {
    opacity: 1;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: #fff;
    cursor: pointer;
    transition: transform 0.3s ease, z-index 0s;
}

.card-inner:hover {
    transform: scale(1.05) !important;
    z-index: 1000 !important;
}

.tarot-card:hover {
    z-index: 1000 !important;
}

.card-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    /* No background fill needed — cover ensures the image fills the container
       with no letterboxing gaps. Cropping is centred so card art is preserved. */
}

/* Reversed cards - rotate the image, not the overlay */
.tarot-card.reversed .card-image {
    transform: rotate(180deg);
}

/* Card Info Overlay - Full card coverage with better readability */
.card-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    padding: 20px 15px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 8px;
}

/* For cards rotated 90 degrees, swap width/height for the overlay */
.tarot-card[data-rotation="90"] .card-info-overlay,
.tarot-card[data-rotation="-90"] .card-info-overlay {
    width: 220px;
    height: 140px;
    left: 50%;
    top: 50%;
    margin-left: -110px;
    margin-top: -70px;
}

.card-inner:hover .card-info-overlay {
    opacity: 1;
}

.card-info-overlay h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    text-transform: uppercase;
    color: #a78bfa;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-info-overlay .card-name {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.card-info-overlay .card-orientation {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-style: italic;
    color: #d1d5db;
}

.card-info-overlay .card-keywords {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.4;
}

/* Interpretation */
.interpretation-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.interpretation-section h3 {
    margin-top: 0;
    font-size: 24px;
    color: #2c3e50;
    border-bottom: 2px solid #8e44ad;
    padding-bottom: 10px;
}

.interpretation-text {
    font-size: 16px;
    line-height: 1.8;
    color: #34495e;
}

.interpretation-text p {
    margin-bottom: 15px;
}

/* Error Message */
.tarot-error {
    background: #e74c3c;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.tarot-error.hidden {
    display: none;
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.error-content .dashicons {
    font-size: 24px;
    margin-right: 10px;
}

.error-content p {
    margin: 0;
    font-size: 16px;
}

/* Dark Theme */
.ai-tarot-reader-container[data-theme="dark"] {
    background: #1a1a2e;
    color: #eee;
}

.ai-tarot-reader-container[data-theme="dark"] .tarot-header h2,
.ai-tarot-reader-container[data-theme="dark"] .selection-group h3 {
    color: #eee;
}

.ai-tarot-reader-container[data-theme="dark"] .option-card {
    background: #16213e;
    border-color: #0f3460;
    color: #eee;
}

.ai-tarot-reader-container[data-theme="dark"] .option-card.selected {
    background: #8e44ad;
    border-color: #732d91;
}

.ai-tarot-reader-container[data-theme="dark"] .interpretation-section {
    background: #16213e;
    color: #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .selection-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .question-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .question-input {
        font-size: 14px;
        padding: 12px;
    }
    
    .cards-display {
        padding: 40px 20px 20px 20px;
        min-height: 400px;
    }
    
    .cards-display.layout-celtic-cross {
        min-height: 600px;
        padding: 60px 30px 40px 30px;
    }
    
    .tarot-card {
        width: 110px;
        height: 173px;
    }
    
    .cards-display.layout-horizontal {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .cards-display.layout-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
        padding: 40px 15px;
    }
    
    .cards-display.layout-grid .tarot-card {
        width: 100%;
        max-width: 110px;
        height: 173px;
        margin: 0 auto;
    }
    
    .tarot-button {
        padding: 12px 24px;
        font-size: 14px;
        margin: 5px;
    }
    
    .card-info-overlay {
        padding: 15px 10px;
    }
    
    .card-info-overlay h4 {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .card-info-overlay .card-name {
        font-size: 14px;
    }
    
    .card-info-overlay .card-orientation {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .card-info-overlay .card-keywords {
        font-size: 10px;
    }
}
/* Reading Length Selector */
.reading-length-container {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.reading-length-container h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.length-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 12px;
}

.length-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.length-option:hover {
    border-color: #8e44ad;
    background: #f9f9f9;
    transform: translateY(-2px);
}

.length-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.length-option input[type="radio"]:checked + .length-label {
    color: #8e44ad;
}

.length-option:has(input[type="radio"]:checked) {
    border-color: #8e44ad;
    background: #f8f4fb;
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.15);
}

.length-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.length-label strong {
    font-size: 15px;
    color: #2c3e50;
}

.length-label small {
    font-size: 12px;
    color: #7f8c8d;
}

.length-description {
    font-size: 13px;
    color: #7f8c8d;
    margin: 10px 0 0 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .length-options {
        grid-template-columns: 1fr;
    }
    
    .length-option {
        padding: 12px;
    }
}

/* Deck Selection */
.deck-selection-container {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.deck-selection-container h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.deck-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 12px;
}

.deck-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deck-option:hover {
    border-color: #8e44ad;
    background: #f9f9f9;
    transform: translateY(-2px);
}

.deck-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.deck-option input[type="radio"]:checked + .deck-label {
    color: #8e44ad;
}

.deck-option:has(input[type="radio"]:checked) {
    border-color: #8e44ad;
    background: #f8f4fb;
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.15);
}

.deck-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.deck-label strong {
    font-size: 15px;
    color: #2c3e50;
}

.deck-label small {
    font-size: 12px;
    color: #7f8c8d;
}

.deck-description {
    font-size: 13px;
    color: #7f8c8d;
    margin: 10px 0 0 0;
    text-align: center;
}

@media (max-width: 768px) {
    .deck-options {
        grid-template-columns: 1fr;
    }
    
    .deck-option {
        padding: 12px;
    }
}

/* Reflection Questions Section */
.reflection-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f4fb 0%, #fff 100%);
    border-radius: 12px;
    border: 2px solid #e8d9f3;
}

.reflection-section h3 {
    color: #8e44ad;
    font-size: 24px;
    margin-bottom: 12px;
    text-align: center;
}

.reflection-intro {
    text-align: center;
    color: #5d6d7e;
    font-size: 15px;
    margin-bottom: 25px;
    font-style: italic;
}

.reflection-questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reflection-question {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e8d9f3;
    transition: all 0.3s ease;
}

.reflection-question:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.15);
    border-color: #8e44ad;
}

.question-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8e44ad 0%, #b968c7 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.question-text {
    flex: 1;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.6;
}

/* Single option hiding */
.single-option {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .reflection-section {
        padding: 20px;
        margin-top: 30px;
    }
    
    .reflection-section h3 {
        font-size: 20px;
    }
    
    .reflection-question {
        padding: 14px;
    }
    
    .question-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .question-text {
        font-size: 14px;
    }
}

/* Extra Small Mobile Devices - Better Card Containment */
@media (max-width: 480px) {
    .cards-display {
        padding: 30px 15px 15px 15px;
        min-height: 350px;
    }
    
    .cards-display.layout-celtic-cross {
        min-height: 500px;
        padding: 40px 15px 20px 15px;
    }
    
    .tarot-card {
        width: 90px !important;
        height: 142px !important;
    }
    
    .cards-display.layout-horizontal {
        gap: 10px;
    }
    
    .cards-display.layout-grid {
        grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
        gap: 10px;
        padding: 30px 10px;
    }
    
    .cards-display.layout-grid .tarot-card {
        max-width: 90px;
        height: 142px;
    }
    
    .card-inner {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }
}

/* Save Reading Button */
.save-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.save-btn.saved {
    background: #27ae60 !important;
    border-color: #27ae60 !important;
    color: white !important;
}

.save-btn.saved:hover {
    background: #229954 !important;
}

/* Spinning animation for loading */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dashicons.spin {
    animation: spin 1s linear infinite;
}

/* ========================================
   RATE LIMIT EXCEEDED MODAL
   Uses .rl-modal-* prefix to avoid clashing
   with the registration modal's .tarot-modal-* classes
======================================== */

.rl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: rl-fade-in 0.2s ease;
}

.rl-modal-overlay.hidden {
    display: none;
}

@keyframes rl-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.rl-modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    animation: rl-modal-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rl-modal-in {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);     }
}

.rl-modal-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 16px;
}

.rl-modal h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2c1654;
    margin: 0 0 14px;
    line-height: 1.3;
}

.rl-modal p {
    font-size: 15px;
    color: #666;
    line-height: 1.65;
    margin: 0 0 28px;
}

.rl-modal-actions {
    display: flex;
    justify-content: center;
}

.rl-modal-actions .tarot-btn {
    min-width: 160px;
}

/* =============================================================================
   Spread Visual Preview (v3.20.0)
   ============================================================================= */

.tarot-spread-preview {
    width: 100%;
    margin: 0 0 1.5rem;
    border-radius: 10px;
    background: #f8f7ff;
    border: 1px solid #e5e1ff;
    overflow: hidden;
}

.tarot-preview-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem 0;
    flex-wrap: wrap;
}

.tarot-preview-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d28d9;
}

.tarot-preview-desc {
    font-size: 0.78rem;
    color: #9ca3af;
}

.tarot-preview-cards {
    min-height: 120px;
}

.tarot-preview-card {
    aspect-ratio: 2 / 3;
    width: 116px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white;
}

.tarot-preview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.35);
}

.tarot-preview-card--crossing {
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
    transform: rotate(90deg) scale(0.72);
    margin: -20px -30px;
    opacity: 0.85;
    z-index: 1;
}

.tarot-preview-card--crossing:hover {
    transform: rotate(90deg) scale(0.75);
}

.tarot-preview-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarot-preview-card-number {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #fbbf24;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.tarot-preview-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 4px 3px;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .tarot-preview-card {
        width: 80px;
    }
    .tarot-spread-preview {
        overflow-x: auto;
    }
}

/* ── Tarot Bookmark / Share button ─────────────────────────────────────────── */
.tarot-btn-bookmark {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: #fff;
    border: none;
    cursor: pointer;
}

.tarot-btn-bookmark:hover {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.35);
}

.tarot-btn-bookmark .dashicons {
    color: #fff;
}


/* =============================================================================
   Shared UI: Auth Modal, Inline Share Panel, Pending Notice (v3.20.3)
   Shared between Oracle Reader and Tarot Reader — do not duplicate.
   ============================================================================= */

/* ── Post-login saved confirmation ────────────────────────────────────────── */
.aior-saved-confirmation {
    text-align: center;
    padding: 2rem 1rem;
    color: #9f7aea;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Post-login pending reading notice banner ─────────────────────────────── */
.aior-pending-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.aior-pending-notice.aior-pending-error {
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
}

.aior-pending-notice a {
    color: #fff;
    text-decoration: underline;
}

.aior-pending-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aiorSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes aiorSpin {
    to { transform: rotate(360deg); }
}

/* ── Auth Modal Overlay ───────────────────────────────────────────────────── */
.aior-auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 10, 30, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.aior-auth-modal-box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 3rem 2.5rem 2.5rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.08);
    animation: aiorModalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes aiorModalIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* Close button */
.aior-auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.aior-auth-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Decorative stars */
.aior-auth-modal-stars {
    font-size: 1.1rem;
    letter-spacing: 0.4em;
    color: #9f7aea;
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* Icon circle */
.aior-auth-modal-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
}

/* Title */
.aior-auth-modal-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.6rem;
    line-height: 1.25;
}

/* Subtitle */
.aior-auth-modal-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 2rem;
}

/* CTA buttons */
.aior-auth-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.aior-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.aior-auth-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.aior-auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
    text-decoration: none;
}

.aior-auth-btn-secondary {
    background: #f9fafb;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.aior-auth-btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9f7aea;
    color: #374151;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ── Inline Share Panel (shown after Bookmark / Share for logged-in users) ── */
.aior-inline-share-panel {
    margin-top: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 14px;
    animation: aiorModalIn 0.25s ease both;
}

.aior-inline-share-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.aior-inline-share-label {
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.aior-inline-share-link-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 480px;
}

.aior-inline-share-url {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #e9d8fd;
    font-size: 0.85rem;
    outline: none;
    min-width: 0;
}

.aior-inline-copy-btn {
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.aior-inline-copy-btn:hover {
    opacity: 0.88;
}

.aior-inline-share-socials {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.aior-inline-social {
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s, transform 0.2s;
}

.aior-inline-social:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.aior-soc-fb { background: #1877f2; }
.aior-soc-tw { background: #000; }
.aior-soc-pi { background: #e60023; }
.aior-soc-em { background: #6b7280; }

/* Mobile tweaks */
@media (max-width: 520px) {
    .aior-auth-modal-box {
        padding: 2.5rem 1.5rem 2rem;
    }
    .aior-auth-modal-title {
        font-size: 1.2rem;
    }
    .aior-inline-share-link-row {
        flex-direction: column;
    }
    .aior-inline-copy-btn {
        width: 100%;
    }
}
