<div>
<style>
    :root {
        --primary-blue: #2A4E6D;
        --secondary-blue: #4A90E2;
        --light-bg: #F0F7FF;
        --accent-orange: #FF6B35;
    }

    .form-container {
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }

    .col-background {
        background: var(--light-bg) !important;
        border-radius: 8px;
        display: flex;
        align-items: center;
        padding: 1rem !important;
    }

    .form-control {
        border: 2px solid #e0e7f1 !important;
        border-radius: 8px !important;
        padding: 0.75rem 1rem !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .form-control:focus {
        border-color: var(--secondary-blue) !important;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1) !important;
    }

    .radio-group {
        display: flex;
        gap: 1.5rem;
        align-items: center;
    }

    .radio-group label {
        position: relative;
        padding-left: 28px;
        cursor: pointer;
    }

    .radio-group input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .radio-group input[type="radio"] + span {
        position: absolute;
        left: 0;
        top: 1px;
        width: 20px;
        height: 20px;
        border: 2px solid var(--primary-blue);
        border-radius: 50%;
    }

    .radio-group input[type="radio"]:checked + span {
        border-color: var(--secondary-blue);
    }

    .radio-group input[type="radio"]:checked + span:after {
        content: '';
        position: absolute;
        width: 12px;
        height: 12px;
        background: var(--secondary-blue);
        border-radius: 50%;
        top: 2px;
        left: 2px;
    }

    .btn-success {
        background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
        border: none;
        padding: 1rem 2.5rem;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(42, 78, 109, 0.3);
    }


    textarea.form-control {
        min-height: 120px;
        resize: vertical;
    }

    select.form-control {
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232A4E6D'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 12px;
    }

    @media (max-width: 768px) {
        .col-background {
            margin-bottom: 1rem;
        }
        
        .radio-group {
            flex-direction: column;
            align-items: flex-start;
        }
        
        .form-control {
            padding: 0.6rem 0.8rem !important;
        }
        
        .btn-success {
            width: 100%;
            padding: 1rem;
        }
    }

    /* Estilo para campos readonly */
    .form-control[readonly] {
        background-color: #f8f9fa;
        border-color: #dee2e6 !important;
    }
</style>
    <form name="{{$name}}" id="{{$id}}"  class="form-control" action="{{$action}}" method="POST">
        <input id="id" name="id" value="{{$people->id}}" type="hidden" class="form-control">
        
        @if(isset($_GET['continueFromAppointment']) && ($_GET['continueFromAppointment'] === '1'))
            <input type="hidden" name="continueFromAppointment" id="continueFromAppointment" value="1">
        @endif


        @if(isset($_GET["date"]))
            <input type="hidden" name="date" id="date" value="{{$_GET['date']}}">
        @endif
        @if(isset($_GET["dateAppointment"]))
            <input type="hidden" name="dateAppointment" id="dateAppointment" value="{{$_GET['dateAppointment']}}">
        @endif
        @if(isset($_GET["especiality"]))
            <input type="hidden" name="especiality" id="especiality" value="{{$_GET['especiality']}}">
        @endif
        @if(isset($_GET["hour"]))
            <input type="hidden" name="hour" id="hour" value="{{$_GET['hour']}}">
        @endif
        @if(isset($_GET["minute"]))
            <input type="hidden" name="minute" id="minute" value="{{$_GET['minute']}}">
        @endif
        @if(isset($_GET["schedule"]))
            <input type="hidden" name="schedule" id="schedule" value="{{$_GET['schedule']}}">
        @endif
        @if(isset($_GET["summary"]))
            <input type="hidden" name="summary" id="summary" value="{{$_GET['summary']}}">
        @endif
        @if(isset($_GET["doctorname"]))
            <input type="hidden" name="doctorname" id="doctorname" value="{{$_GET['doctorname']}}">
        @endif
        <div class="container-fluid">
            <div class="row">
                <div style="background-color:#f0f5ff" class="col-12 p-3 col-lg-10 col-md-10">
                <b><label for="gender">{{__("com-form-identity.gender")}}</label></b>
                    &nbsp;
                    &nbsp;
                    @if(isset($people->gender))
                        @if(strtoupper($people->gender) === "F")
                            {{__("common.genderFemale")}} <input id="gender"  checked type="radio" name="gender" value="F">
                            {{__("common.genderMale")}} <input id="gender"  type="radio" name="gender" value="M">
                            {{__("common.genderOther")}} <input id="gender"   type="radio" name="gender" value="O">
                        @elseif(strtoupper($people->gender) === "M")
                            {{__("common.genderFemale")}} <input id="gender"   type="radio" name="gender" value="F">
                            {{__("common.genderMale")}} <input id="gender"  checked type="radio" name="gender" value="M">
                            {{__("common.genderOther")}} <input id="gender"   type="radio" name="gender" value="O">
                        @else
                            {{__("common.genderFemale")}} <input id="gender"   type="radio" name="gender" value="F">
                            {{__("common.genderMale")}} <input id="gender"   type="radio" name="gender" value="M">
                            {{__("common.genderOther")}} <input id="gender" checked  type="radio" name="gender" value="O">
                        @endif
                    @else
                    {{__("common.genderFemale")}} <input id="gender" type="radio" name="gender" value="F">
                        {{__("common.genderMale")}} <input id="gender" type="radio" name="gender" value="M">
                        {{__("common.genderOther")}} <input id="gender"   type="radio" name="gender" value="O">
                    @endif
                </div>
                <div class="col-12 p-3 col-lg-2 col-md-2 d-flex justify-content-center">
                         <img class="w-10" src="{{asset('img/ofiuco.png')}}" alt="">
                </div>
            </div>
            <div class="row">
                <div class="col-12">
                    <div class="container-fluid">
                      
                        <div class="row p-2">
                            <div class="col-12  col-lg-4 col-md-4 col-background">
                                <b><label for="firstname">{{__("com-form-identity.firstname")}}</label></b>
                            </div>
                            <div class="col-12 col-lg-8 col-md-8">
                                <input placeholder={{__("com-form-identity.firstname")}} id="firstname" name="firstname" value="{{$people->firstname}}" type="text" class="form-control">
                            </div>
                        </div>
                        <div class="row p-2">
                            <div class="col-12  col-lg-4 col-md-4 col-background">
                                <b><label for="lastname">{{__("com-form-identity.lastname")}}</label></b>
                            </div>
                            <div class="col-12 col-lg-8 col-md-8">
                                <input placeholder={{__("com-form-identity.lastname")}} id="lastname" name="lastname" value="{{$people->lastname}}" type="text" class="form-control">
                            </div>
                        </div>
                        <div class="row p-2">
                            <div class="col-12  col-lg-4 col-md-4 col-background">
                                <b><label for="birthday">{{__("com-form-identity.birthday")}}</label></b>
                            </div>
                            <div class="col-12 col-lg-8 col-md-8">
                                <input placeholder={{__("com-form-identity.birthday")}} id="birthday" name="birthday" value="{{$people->birthday}}" type="text" class="form-control">
                            </div>
                        </div>
                        <div class="row p-2">
                            <div class="col-12  col-lg-4 col-md-4 col-background">
                                <b><label for="age">{{__("com-form-identity.age")}}</label></b>
                            </div>
                            <div class="col-12 col-lg-8 col-md-8">
                                <input placeholder={{__("com-form-identity.age")}} id="age" name="age" value="{{$people->age}}" type="text" class="form-control" readonly>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12 p-0">
                                <div class="container-fluid" id="identificationPersonal">
                                    <div class="row p-2" >
                                        <div class="col-12  col-lg-4 col-md-4 col-background">
                                            <b><label for="identification">{{__("com-form-identity.identification")}}</label></b>
                                        </div>
                                        <div class="col-12 col-lg-8 col-md-8">
                                            <input placeholder={{__("com-form-identity.identification")}} id="identification" name="identification" value="{{$people->identification}}" type="text" class="form-control">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row p-2">
                            <div class="col-12 col-lg-4 col-md-4 col-background">
                                <label for="blood_type"><b>{{__("com-form-identity.bloodType")}}</b></label>
                            </div>
                            <div class="col-12 col-lg-8 col-md-8">
                                <select  data-live-search="true"  class="form-control selectpicker" id="blood_type" name="blood_type" value="{{$people->blood_type}}">
                                    <option value>{{__('com-form-identity.unknow')}}</option>
                                    @foreach($bloodTypes as $type)
                                        @if((isset($people->blood_type)) && (strtoupper($people->blood_type) === strtoupper($type)))
                                            <option data-tokens="{{$type}}" value="{{$type}}" selected>{{$type}}</option>
                                        @else
                                            <option data-tokens="{{$type}}" value="{{$type}}">{{$type}}</option>
                                        @endif
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12 p-0">
                                <div  id="containerContact" class="container-fluid">
                                    <div class="row p-2">
                                        <div class="col-12  col-lg-4 col-md-4 col-background">
                                            <b><label for="email">{{__("com-form-identity.email")}}</label></b>
                                        </div>
                                        <div class="col-12 col-lg-8 col-md-8">
                                            <input placeholder={{__("com-form-identity.email")}} id="email" name="email" value="{{$people->email}}" type="text" class="form-control">
                                        </div>
                                    </div>
                                    <div class="row p-2">
                                        <div class="col-12  col-lg-4 col-md-4 col-background">
                                            <b><label for="phone">{{__("com-form-identity.phone")}}</label></b>
                                        </div>
                                        <div class="col-12 col-lg-8 col-md-8">
                                            <input placeholder={{__("com-form-identity.phone")}} id="phone" name="phone" value="{{$people->phone}}" type="text" class="form-control">
                                        </div>
                                    </div>
                                    <div class="row p-2">
                                        <div class="col-12  col-lg-4 col-md-4 col-background">
                                            <b><label for="address">{{__("com-form-identity.address")}}</label></b>
                                        </div>
                                        <div class="col-12 col-lg-8 col-md-8">
                                            <textarea rows="5" placeholder={{__("com-form-identity.address")}} id="address" name="address" class="form-control">{{$people->address}}</textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <input id="patient_id" type="hidden" name="patient_id" value="{{$patientId}}">
                    </div>
                </div>
            </div>
        </div>
        <div class="container-fluid p-3">
            <div class="row">
                <div class="col-12 text-center">
                    <input  class="btn btn-success" type="submit" value="{{($new === true) ? __('com-form-identity.btnSubmit') : __('com-form-identity.btnSubmitUpdate') }}">
                    @csrf
                </div>
            </div>
        </div>
    </form>
</div>