/**
 * Weton Calculator Styles - Tema Jawa
 * 
 * @package WetonCalculator
 */

/* Tema Jawa - Warna utama: coklat, gold, hijau */
:root {
    --weton-primary: #8B4513; /* Coklat tua */
    --weton-secondary: #DAA520; /* Gold */
    --weton-accent: #228B22; /* Hijau tua */
    --weton-light-brown: #D2B48C; /* Coklat muda */
    --weton-cream: #F5F5DC; /* Krem */
    --weton-dark-green: #006400; /* Hijau gelap */
    --weton-gold-light: #FFD700; /* Gold terang */
    --weton-shadow: rgba(139, 69, 19, 0.2); /* Shadow coklat */
}

/* Main container */
.weton-calculator-wrapper {
    margin: 20px 0;
    font-family: 'Georgia', 'Times New Roman', serif;
    position: relative;
}

.weton-calculator-container {
    background: linear-gradient(145deg, var(--weton-cream) 0%, var(--weton-light-brown) 100%);
    border: 2px solid var(--weton-primary);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 8px 25px var(--weton-shadow);
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Ornamen Jawa */
.weton-calculator-container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--weton-secondary) 30%, transparent 30%);
    opacity: 0.1;
    z-index: -1;
}

.weton-calculator-container::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--weton-accent) 40%, transparent 40%);
    opacity: 0.1;
    z-index: -1;
}

.weton-calculator-container.theme-default {
    background: linear-gradient(135deg, var(--weton-primary) 0%, var(--weton-secondary) 50%, var(--weton-accent) 100%);
    color: var(--weton-cream);
}

.weton-calculator-container.theme-default .form-control {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--weton-gold-light);
}

/* Title */
.weton-calculator-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    color: var(--weton-primary);
    text-shadow: 2px 2px 4px var(--weton-shadow);
    font-family: 'Georgia', serif;
    position: relative;
}

.weton-calculator-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--weton-secondary), var(--weton-accent), var(--weton-secondary));
    border-radius: 2px;
}

/* Form styles */
.weton-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 18px;
    color: var(--weton-primary);
    font-family: 'Georgia', serif;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--weton-primary);
    background-color: var(--weton-cream);
    background-clip: padding-box;
    border: 2px solid var(--weton-light-brown);
    border-radius: 10px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-control:focus {
    color: var(--weton-primary);
    background-color: #fff;
    border-color: var(--weton-secondary);
    outline: 0;
    box-shadow: 0 0 0 0.3rem rgba(218, 165, 32, 0.25);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 2px solid transparent;
    padding: 15px 30px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Georgia', serif;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 0;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn > * {
    position: relative;
    z-index: 1;
}

.btn-primary {
    color: var(--weton-cream);
    background: linear-gradient(45deg, var(--weton-primary), var(--weton-secondary));
    border-color: var(--weton-secondary);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.btn-primary:hover {
    color: var(--weton-cream);
    background: linear-gradient(45deg, var(--weton-secondary), var(--weton-accent));
    border-color: var(--weton-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.btn-secondary {
    color: var(--weton-cream);
    background: linear-gradient(45deg, var(--weton-accent), var(--weton-light-brown));
    border-color: var(--weton-accent);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}

.btn-secondary:hover {
    color: var(--weton-cream);
    background: linear-gradient(45deg, var(--weton-light-brown), var(--weton-primary));
    border-color: var(--weton-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(34, 139, 34, 0.4);
}

/* Loading indicator */
.weton-loading {
    text-align: center;
    padding: 40px;
    background: linear-gradient(145deg, rgba(245, 245, 220, 0.9), rgba(210, 180, 140, 0.9));
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid var(--weton-light-brown);
}

.loading-spinner {
    border: 4px solid var(--weton-light-brown);
    border-top: 4px solid var(--weton-secondary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: wetonSpin 1.2s ease-in-out infinite;
    margin: 0 auto 20px;
}

@keyframes wetonSpin {
    0% { 
        transform: rotate(0deg) scale(1);
        border-top-color: var(--weton-secondary);
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
        border-top-color: var(--weton-accent);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        border-top-color: var(--weton-secondary);
    }
}

.weton-loading p {
    color: var(--weton-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    font-family: 'Georgia', serif;
}

/* Results container */
.weton-results {
    margin-top: 35px;
    animation: wetonFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes wetonFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

.weton-result-container {
    background: linear-gradient(135deg, var(--weton-cream) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 2px solid var(--weton-secondary);
    border-radius: 15px;
    padding: 30px;
    margin-top: 25px;
    box-shadow: 0 10px 30px var(--weton-shadow);
    position: relative;
    overflow: hidden;
}

.weton-result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--weton-primary), var(--weton-secondary), var(--weton-accent), var(--weton-secondary), var(--weton-primary));
}

.theme-default .weton-result-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), var(--weton-cream));
    color: var(--weton-primary);
}

.weton-main-result {
    margin-bottom: 30px;
    text-align: center;
}

.weton-main-result h4 {
    color: var(--weton-primary);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px var(--weton-shadow);
}

.weton-info p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--weton-primary);
    font-weight: 500;
}

.weton-highlight {
    background: linear-gradient(45deg, var(--weton-secondary), var(--weton-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 22px;
    text-shadow: none;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    position: relative;
    margin: 0 4px;
}

.weton-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--weton-secondary), var(--weton-accent));
    opacity: 0.1;
    border-radius: 8px;
    z-index: -1;
}

/* Interpretation styles */
.weton-interpretation {
    border-top: 3px solid var(--weton-secondary);
    padding-top: 30px;
    margin-top: 25px;
}

.weton-interpretation h5 {
    color: var(--weton-primary);
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Georgia', serif;
    text-align: center;
}

.interpretation-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(245, 245, 220, 0.5);
    border-radius: 10px;
    border-left: 4px solid var(--weton-accent);
}

.interpretation-section h6 {
    color: var(--weton-primary);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Georgia', serif;
}

.interpretation-section p {
    color: var(--weton-primary);
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 15px;
}

/* Lucky colors */
.lucky-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
}

.color-tag {
    background: linear-gradient(45deg, var(--weton-secondary), var(--weton-accent));
    color: var(--weton-cream);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
    transition: all 0.3s ease;
    border: 2px solid var(--weton-gold-light);
}

.color-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(218, 165, 32, 0.4);
}

/* Lucky numbers */
.lucky-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.number-tag {
    background: linear-gradient(45deg, var(--weton-primary), var(--weton-secondary));
    color: var(--weton-cream);
    padding: 12px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px var(--weton-shadow);
    transition: all 0.3s ease;
    border: 3px solid var(--weton-gold-light);
    font-family: 'Georgia', serif;
}

.number-tag:hover {
    transform: translateY(-3px) scale(1.1) rotate(5deg);
    box-shadow: 0 8px 22px var(--weton-shadow);
    background: linear-gradient(45deg, var(--weton-accent), var(--weton-secondary));
}

/* Actions */
.weton-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--weton-light-brown);
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error styles */
.weton-error {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    padding: 20px;
    border: 2px solid #ef5350;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.2);
}

.weton-error-container {
    animation: wetonShake 0.5s ease-in-out;
}

@keyframes wetonShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive design */
@media (max-width: 768px) {
    .weton-calculator-container {
        padding: 25px 20px;
        margin: 10px;
        border-radius: 12px;
    }
    
    .weton-calculator-title {
        font-size: 24px;
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 16px;
    }
    
    .lucky-colors,
    .lucky-numbers {
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        padding: 15px;
        margin: 5px 0;
    }
    
    .weton-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .weton-actions .btn {
        width: 100%;
    }
    
    .weton-highlight {
        font-size: 20px;
        padding: 6px 12px;
    }
    
    .interpretation-section {
        padding: 15px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .weton-calculator-container {
        padding: 20px 15px;
        margin: 5px;
    }
    
    .weton-result-container {
        padding: 20px 15px;
    }
    
    .weton-highlight {
        font-size: 18px;
        display: block;
        margin: 8px 0;
    }
    
    .lucky-numbers .number-tag {
        min-width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .color-tag {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .weton-results,
    .btn::before,
    .loading-spinner,
    .color-tag,
    .number-tag {
        animation: none;
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .weton-calculator-container {
        border-width: 3px;
        background: #ffffff;
        color: #000000;
    }
    
    .form-control {
        border-width: 2px;
        background: #ffffff;
        color: #000000;
    }
    
    .btn {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .weton-calculator-container {
        box-shadow: none;
        border: 2px solid #000;
        background: #ffffff;
        color: #000000;
    }
    
    .btn,
    .weton-loading,
    .weton-actions {
        display: none;
    }
    
    .weton-results {
        margin-top: 20px;
    }
    
    .color-tag,
    .number-tag {
        background: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
}

/* Focus indicators untuk accessibility */
.form-control:focus,
.btn:focus {
    outline: 3px solid var(--weton-secondary);
    outline-offset: 2px;
}

/* Required field indicator */
.required {
    color: #d32f2f;
    font-weight: bold;
    font-size: 1.2em;
}

.form-text {
    font-size: 0.875em;
    color: var(--weton-primary);
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Button loading state */
.btn-calculate {
    position: relative;
    min-height: 50px;
    transition: all 0.3s ease;
}

.btn-calculate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-calculate .btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    font-weight: 600;
}

.btn-calculate .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--weton-cream);
    border-radius: 50%;
    border-top-color: transparent;
    animation: wetonSpin 1s linear infinite;
    margin-right: 8px;
}