/**
 * Horóscopo Central - Suíte de Calculadoras de Numerologia
 * Frontend Scoped Styles
 */

:root {
    --hc-num-primary: #581c87;
    --hc-num-primary-hover: #4c1d95;
    --hc-num-accent: #f59e0b;
    --hc-num-bg-card: #ffffff;
    --hc-num-border: #e2e8f0;
    --hc-num-text-dark: #1e293b;
    --hc-num-text-muted: #64748b;
    --hc-num-radius: 12px;
    --hc-num-shadow: 0 4px 20px -2px rgba(88, 28, 135, 0.08);
}

.hc-num-calc-wrapper {
    background: var(--hc-num-bg-card);
    border: 1px solid var(--hc-num-border);
    border-radius: var(--hc-num-radius);
    box-shadow: var(--hc-num-shadow);
    padding: 32px 28px;
    margin: 35px auto;
    max-width: 720px;
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
}

.hc-num-calc-wrapper * {
    box-sizing: border-box;
}

.hc-num-calc-header {
    margin-bottom: 24px;
    text-align: center;
}

.hc-num-calc-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--hc-num-text-dark);
    line-height: 1.3;
}

.hc-num-calc-desc {
    margin: 0;
    font-size: 14px;
    color: var(--hc-num-text-muted);
    line-height: 1.5;
}

/* Fields */
.hc-num-calc-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.hc-num-calc-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hc-num-text-dark);
    margin-bottom: 6px;
}

.hc-num-calc-input,
.hc-num-calc-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--hc-num-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--hc-num-text-dark);
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.hc-num-calc-input:focus,
.hc-num-calc-select:focus {
    border-color: var(--hc-num-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(88, 28, 135, 0.12);
}

/* Actions */
.hc-num-calc-actions {
    text-align: center;
}

.hc-num-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--hc-num-primary) 0%, #7e22ce 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(88, 28, 135, 0.25);
}

.hc-num-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(88, 28, 135, 0.35);
    background: linear-gradient(135deg, var(--hc-num-primary-hover) 0%, #6b21a8 100%);
}

.hc-btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: hc-spin 0.8s linear infinite;
}

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

.hc-loading .hc-btn-spinner {
    display: inline-block;
}

.hc-loading .hc-btn-text {
    opacity: 0.85;
}

/* Error message */
.hc-num-calc-error {
    margin-top: 14px;
    padding: 12px 16px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    color: #991b1b;
    font-size: 14px;
    font-weight: 500;
}

/* Result Card */
.hc-num-calc-result {
    margin-top: 28px;
    animation: hc-fade-in 0.4s ease-out;
}

@keyframes hc-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hc-num-calc-card {
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
    border: 1.5px solid #e9d5ff;
    border-radius: var(--hc-num-radius);
    padding: 24px;
    text-align: center;
}

.hc-num-calc-card-header {
    margin-bottom: 12px;
}

.hc-num-calc-card-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b21a8;
    margin-bottom: 8px;
}

.hc-num-calc-badge-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 8px;
}

.hc-num-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.hc-badge-master {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.hc-badge-karmic {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.hc-num-display-number {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: var(--hc-num-primary);
    margin: 12px 0;
    text-shadow: 0 2px 8px rgba(88, 28, 135, 0.15);
}

.hc-num-summary {
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 16px auto;
}

.hc-num-calc-details {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #475569;
    margin: 16px auto;
    max-width: 520px;
    text-align: left;
}

.hc-num-steps-flow {
    color: #6b21a8;
    font-weight: 600;
}

.hc-num-card-action {
    margin-top: 20px;
}

.hc-num-link-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #ffffff;
    color: var(--hc-num-primary) !important;
    border: 2px solid var(--hc-num-primary);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.hc-num-link-btn:hover {
    background: var(--hc-num-primary);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 28, 135, 0.2);
}

/* Multi-Item Grid Cards (Ciclos, Pináculos, Desafios) */
.hc-num-multi-wrapper {
    margin-top: 20px;
}

.hc-num-multi-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--hc-num-text-dark);
    text-align: center;
}

.hc-num-multi-desc {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: var(--hc-num-text-muted);
    text-align: center;
}

.hc-num-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.hc-num-grid-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hc-num-grid-card:hover {
    border-color: #c084fc;
    box-shadow: 0 4px 12px rgba(88, 28, 135, 0.08);
    transform: translateY(-2px);
}

.hc-grid-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hc-grid-card-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

.hc-grid-card-number {
    font-size: 38px;
    font-weight: 800;
    color: var(--hc-num-primary);
    line-height: 1;
    margin: 10px 0;
}

.hc-grid-card-period {
    font-size: 12px;
    color: #475569;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.hc-grid-card-link {
    display: inline-block;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hc-num-primary) !important;
    border: 1px solid #d8b4fe;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    background: #faf5ff;
}

.hc-grid-card-link:hover {
    background: var(--hc-num-primary);
    color: #ffffff !important;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .hc-num-calc-wrapper {
        padding: 24px 18px;
        margin: 25px 0;
    }

    .hc-num-grid-cards {
        grid-template-columns: 1fr;
    }


    .hc-num-display-number {
        font-size: 46px;
    }

    .hc-num-calc-title {
        font-size: 19px;
    }

    .hc-num-link-btn {
        width: 100%;
        text-align: center;
    }
}
