<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">

    <!-- ===== TEMA PRINCIPAL DO APP ===== -->
    <style name="Theme.Finzora" parent="Theme.MaterialComponents.DayNight.NoActionBar">
        <!-- Cores principais -->
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryVariant">@color/primary_dark</item>
        <item name="colorOnPrimary">@color/text_white</item>

        <!-- Cores secundárias -->
        <item name="colorSecondary">@color/accent</item>
        <item name="colorSecondaryVariant">@color/accent_dark</item>
        <item name="colorOnSecondary">@color/text_white</item>

        <!-- Cores de fundo -->
        <item name="android:windowBackground">@color/background_light</item>
        <item name="android:colorBackground">@color/background_light</item>

        <!-- Status Bar -->
        <item name="android:statusBarColor">@color/primary_dark</item>
        <item name="android:windowLightStatusBar">false</item>

        <!-- Navigation Bar (se necessário) -->
        <item name="android:navigationBarColor">@color/background_light</item>

        <!-- Estilos de componentes -->
        <item name="materialButtonStyle">@style/Widget.Finzora.Button.Primary</item>
        <item name="textInputStyle">@style/Widget.Finzora.TextInputLayout</item>
        <item name="cardViewStyle">@style/Widget.Finzora.CardView</item>

        <!-- Tipografia -->
        <item name="android:fontFamily">sans-serif</item>

        <!-- Animações -->
        <item name="android:windowAnimationStyle">@style/WindowAnimation.Finzora</item>
    </style>

    <!-- ===== BOTÕES ===== -->
    <style name="Widget.Finzora.Button.Primary" parent="Widget.MaterialComponents.Button">
        <item name="android:minHeight">56dp</item>
        <item name="android:paddingVertical">16dp</item>
        <item name="android:paddingHorizontal">24dp</item>
        <item name="cornerRadius">28dp</item>
        <item name="android:textAllCaps">false</item>
        <item name="android:textSize">16sp</item>
        <item name="android:textStyle">bold</item>
        <item name="android:letterSpacing">0.02</item>
    </style>

    <style name="Widget.Finzora.Button.Secondary" parent="Widget.Finzora.Button.Primary">
        <item name="backgroundTint">@color/background_card</item>
        <item name="android:textColor">@color/primary</item>
        <item name="strokeColor">@color/primary</item>
        <item name="strokeWidth">2dp</item>
    </style>

    <style name="Widget.Finzora.Button.Text" parent="Widget.AppCompat.Button.Borderless">
        <item name="android:textColor">@color/primary</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textStyle">normal</item>
        <item name="android:padding">8dp</item>
    </style>

    <!-- ===== TEXT INPUTS ===== -->
    <style name="Widget.Finzora.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
        <item name="boxStrokeColor">@color/border_light</item>
        <item name="boxStrokeWidth">1dp</item>
        <item name="boxCornerRadiusTopStart">8dp</item>
        <item name="boxCornerRadiusTopEnd">8dp</item>
        <item name="boxCornerRadiusBottomStart">8dp</item>
        <item name="boxCornerRadiusBottomEnd">8dp</item>
        <item name="hintTextColor">@color/text_hint</item>
        <item name="errorTextColor">@color/error</item>
        <item name="android:paddingVertical">4dp</item>
    </style>

    <!-- ===== CARDS ===== -->
    <style name="Widget.Finzora.CardView" parent="CardView">
        <item name="cardCornerRadius">16dp</item>
        <item name="cardElevation">4dp</item>
        <item name="cardUseCompatPadding">true</item>
        <item name="cardBackgroundColor">@color/background_card</item>
    </style>

    <style name="Widget.Finzora.CardView.Elevated" parent="Widget.Finzora.CardView">
        <item name="cardElevation">8dp</item>
        <item name="cardMaxElevation">12dp</item>
    </style>

    <!-- ===== TYPOGRAPHY ===== -->
    <style name="TextAppearance.Finzora.Headline1">
        <item name="android:textSize">24sp</item>
        <item name="android:textStyle">bold</item>
        <item name="android:textColor">@color/text_primary</item>
        <item name="android:letterSpacing">0.01</item>
    </style>

    <style name="TextAppearance.Finzora.Headline2">
        <item name="android:textSize">20sp</item>
        <item name="android:textStyle">bold</item>
        <item name="android:textColor">@color/text_primary</item>
    </style>

    <style name="TextAppearance.Finzora.Body1">
        <item name="android:textSize">16sp</item>
        <item name="android:textColor">@color/text_primary</item>
        <item name="android:lineSpacingExtra">4dp</item>
    </style>

    <style name="TextAppearance.Finzora.Body2">
        <item name="android:textSize">14sp</item>
        <item name="android:textColor">@color/text_secondary</item>
    </style>

    <style name="TextAppearance.Finzora.Caption">
        <item name="android:textSize">12sp</item>
        <item name="android:textColor">@color/text_hint</item>
    </style>

    <!-- ===== BADGES & CHIPS ===== -->
    <style name="Widget.Finzora.Chip" parent="Widget.MaterialComponents.Chip.Choice">
        <item name="chipBackgroundColor">@color/primary_light</item>
        <item name="chipStrokeColor">@color/primary</item>
        <item name="chipStrokeWidth">1dp</item>
        <item name="cornerRadius">16dp</item>
        <item name="android:textColor">@color/primary</item>
    </style>

    <!-- ===== ANIMAÇÕES ===== -->
    <style name="WindowAnimation.Finzora">
        <item name="android:windowEnterAnimation">@anim/slide_in_right</item>
        <item name="android:windowExitAnimation">@anim/slide_out_left</item>
        <item name="android:activityOpenEnterAnimation">@anim/slide_in_right</item>
        <item name="android:activityOpenExitAnimation">@anim/slide_out_left</item>
        <item name="android:activityCloseEnterAnimation">@android:anim/fade_in</item>
        <item name="android:activityCloseExitAnimation">@android:anim/fade_out</item>
    </style>

    <!-- ===== DIALOGS ===== -->
    <style name="Theme.Finzora.Dialog" parent="Theme.MaterialComponents.Light.Dialog">
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryVariant">@color/primary_dark</item>
        <item name="colorOnPrimary">@color/text_white</item>
        <item name="cornerRadius">16dp</item>
    </style>

    <!-- ===== TOOLBAR ===== -->
    <style name="Widget.Finzora.Toolbar" parent="Widget.MaterialComponents.Toolbar.Primary">
        <item name="titleTextColor">@color/text_white</item>
        <item name="subtitleTextColor">@color/primary_light</item>
        <item name="android:minHeight">?attr/actionBarSize</item>
        <item name="elevation">4dp</item>
    </style>

</resources>