/* Bulletproof Styles for WordPress Plugin */

/* Reset & Scope */
#cg-app-root {
    all: initial; /* Reset inherited styles */
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    display: block !important;
    max-width: 900px !important;
    margin: 40px auto !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
}

#cg-app-root * {
    box-sizing: border-box !important;
    font-family: inherit !important;
}

/* Card Container */
#cg-app-root .cg-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
    display: block !important;
}

/* Grid Layout */
#cg-app-root .cg-grid {
    display: grid !important;
    grid-template-columns: 1.2fr 0.8fr !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    #cg-app-root .cg-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Left Section */
#cg-app-root .cg-converter-section {
    padding: 40px !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

#cg-app-root .cg-input-container {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

#cg-app-root .cg-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
}

#cg-app-root .cg-amount-wrapper {
    position: relative !important;
    width: 100% !important;
}

#cg-app-root .cg-amount-wrapper input,
#cg-app-root input[type="number"] {
    width: 100% !important;
    height: 64px !important;
    padding: 0 16px 0 24px !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    appearance: none !important;
    -moz-appearance: textfield !important;
}

#cg-app-root input[type="number"]:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

#cg-app-root .cg-currency-grid {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    gap: 16px !important;
    align-items: end !important;
    width: 100% !important;
}

#cg-app-root .cg-select-wrapper {
    position: relative !important;
    width: 100% !important;
}

#cg-app-root .cg-select-wrapper select {
    width: 100% !important;
    height: 56px !important;
    padding: 0 16px 0 48px !important; /* Space for flag */
    font-size: 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer !important;
    margin: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Custom dropdown arrow if needed, but keeping it simple for now */

#cg-app-root .cg-flag {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 24px !important;
    pointer-events: none !important;
    z-index: 2 !important;
    line-height: 1 !important;
}

#cg-app-root #cg-swap-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
    min-width: 40px !important;
}

#cg-app-root #cg-swap-btn:hover {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
    background: #eff6ff !important;
}

#cg-app-root .cg-result-section {
    background: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-top: 8px !important;
}

#cg-app-root .cg-rate-text {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-bottom: 4px !important;
}

#cg-app-root .cg-result-row {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

#cg-app-root #cg-result-amount {
    font-size: 36px !important;
    font-weight: 700 !important;
    font-family: 'Manrope', sans-serif !important;
    color: #0f172a !important;
    line-height: 1 !important;
}

#cg-app-root #cg-result-currency {
    font-size: 20px !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

#cg-app-root .cg-timestamp {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin-top: 16px !important;
}

#cg-app-root .cg-cta-button {
    width: 100% !important;
    height: 56px !important;
    background: #0f172a !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2) !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* Right Section */
#cg-app-root .cg-chart-section {
    background: #f8fafc !important;
    border-left: 1px solid #f1f5f9 !important;
    padding: 40px !important;
    display: flex !important;
    flex-direction: column !important;
}

#cg-app-root .cg-chart-header h3 {
    font-family: 'Manrope', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 4px 0 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
}

#cg-app-root .cg-chart-header p {
    font-size: 14px !important;
    color: #64748b !important;
    margin: 0 0 24px 0 !important;
}

#cg-app-root .cg-chart-container {
    flex: 1 !important;
    min-height: 250px !important;
    position: relative !important;
    width: 100% !important;
}

#cg-app-root .cg-features {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin-top: 32px !important;
}

#cg-app-root .cg-feature-item {
    display: flex !important;
    gap: 12px !important;
}

#cg-app-root .cg-icon-box {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

#cg-app-root .cg-blue {
    background: #eff6ff !important;
    color: #2563eb !important;
}

#cg-app-root .cg-emerald {
    background: #ecfdf5 !important;
    color: #059669 !important;
}

#cg-app-root .cg-feature-item h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #0f172a !important;
}

#cg-app-root .cg-feature-item p {
    font-size: 12px !important;
    color: #64748b !important;
    margin: 4px 0 0 0 !important;
    line-height: 1.4 !important;
}

#cg-app-root svg {
    vertical-align: middle;
}
