@extends('modal_pages.base')

@section('main')

<style>
    .list-text{
        font-size: 12px;
        font-weight: 700;
    }
    
    .form-label{
        font-size: 12px;
        color: #9b9b9b !important;
    }
    
    .social-links li{
        margin: 0 8px;
    }
    
    .box-typical.box-typical-padding-update {
        padding: 6px 15px;
    }
    
    .alert_msg{
      color: #f44336 !important;
        padding: 10px;
        background-color: #d8e2e7;
        font-size: small;
        border-radius: 5px;
        }
    
    .badge-sams{
        font-size: 12px !important;
        border: 1px solid #e9f0f3;
        padding: 4px 10px !important;
        color: currentColor;
        background: #f5f4fd;
        font-weight: 600;
    }
    .cancel_button{
        background-color: #ffbd59 !important; 
        border-width: 1px!important;
        border-color: #ffbd59!important;
        color: #fff!important;
        border-radius: 30px!important;
        padding: 6px 11px!important;
        height: 28px!important;
        font-size: 14px!important;
        line-height: 1!important;
        font-weight: 600!important;
    }
    
    #email_holder .whole_body, #email_holder .whole_body div{
        max-width: 100% !important;
    }
    </style>

<form class="modal-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
    {{ csrf_field() }}
    <div class="form-row mb-0">
        <input type="hidden" name="teacher_id" value="{{ $std_proposal->teacher_id }}">
        <input type="hidden" name="student_id" value="{{ $std_proposal->student_id }}">
        <input type="hidden" name="id" value="{{ $std_proposal->id }}">
        <div class="col-md-3 d-none">
            <ul class="list-group">
    
                <li class="list-group-item list-text hand email-list-item" data-related-div="outstanding_emails">
                    Outstanding Emails
                </li> 
            </ul>
        </div>
        <div class="card rounded p-4" style="background-color: white;">
            <div class="box-typical box-typical-padding">
                <div class="row">
                    <div class="col">
                        <p class="mb-3">
                            <span>To:</span>
                            <span class="badge badge-pill badge-sams">
                                {{cn($std_proposal,'student_details.email','')}}
                            </span>
                        </p>
                    </div>
                </div>
              
                {{-- <div class="row">
                    <div class="col">
                        <p style="margin-bottom: 6px;">
                            <span>CC:</span>
                            <span class="badge badge-pill badge-sams">
                               office
                            </span>
                            <span class="badge badge-pill badge-sams">
                                user
                            </span>
                            
                            <span class="badge badge-pill badge-sams">
                                 email
                            </span>
                        </p>
                    </div>
                </div>      --}}
            </div>
    
            <div class="box-typical box-typical-padding mb-0" id="email_holder"></div>
        </div>
        <div class="col-md-12 mt-4">
            <div class="card rounded border-0 shadow" style="background-color:white;">
                <div class="p-3">
                <div class="p-3" style="border: 1px solid #eee; border-radius: 6px;">
                    <h3 style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
                    <h4 class="mb-4" style="text-align: center; font-family:Ubuntu !important; color: #3c4858 !important;">Further Information Required</h4>
                    <div style="border-bottom: 1px solid #eee;"></div>
                    
                    <div class="col-md-12">
                        <div class="row">
                            <div class="col-md-8 mt-3 mb-3">
                                <h5 style="margin: 0px;"> {{cn($std_proposal,'student_details.first_name','')}} {{cn($std_proposal,'student_details.last_name','')}} </h5>
                                {{-- <span style="margin: 0px;">
                                    @if($std_proposal->student_details->university_name)
                                     {{cn($std_proposal,'student_details.university_name','')}}
                                     @else
                                     {{cn($std_proposal,'student_details.universit.name','')}}
                                    @endif
                                </span>
                                <span> • </span> --}}
                                {{-- <span> Masters </span> --}}
                                <p style="margin: 0px;">Apply Ref : {{ $std_proposal->student_apply_ref ?? "N/A"}}</p>
                            </div>
                            <div class="col-md-4  mt-3 mb-3" style="text-align: end;">
                                <p style="margin: 0px;">{{ Carbon\Carbon::now()->format('d M, Y')}}</p>
                                {{-- <p style="margin: 0px;">Our Reference : {{ $std_proposal->student_apply_ref ?? "N/A"}}</p> --}}
                            </div>
                        </div>
                        <div style="border-bottom: 1px solid #eee;"></div>
                    </div>
                    
                    <p class="mt-3">Dear {{cn($std_proposal,'student_details.first_name','')}} {{cn($std_proposal,'student_details.last_name','')}},</p>
                    <p class="mt-3" style="margin: 0px;">Thank you for submitting your research proposal. </p>
                    <p class="mt-3" style="margin: 0px;">To further evaluate your application, the following documents/information are required: </p>
                    <ul>
                        @if(count($doc_requirement_list) > 0)
                        @foreach($doc_requirement_list as $row)
                        <li>
                            <div class="input-group mt-2"> 
                                <div class="input-group-addon">
                                    <div class="checkbox-bird green" style="margin: 0px;">
                                         {{ $row->requirement_title}}
                                    </div>
                                </div>
                            </div>
                        </li>
                        @endforeach
                        @endif
                    </ul>  
                    <p class="mt-3" style="margin: 0px;">I highly recommend that you provide the required documents/information as soon as possible to avoid any delays in the review process. </p>
                    <p class="mt-3" style="margin: 0px;">Looking forward to hearing from you. </p>
                    <p class="mt-3" style="margin: 0px;">Thanking you</p>
                    <p> {{cn($std_proposal,'teacher_details.first_name','')}} {{cn($std_proposal,'teacher_details.last_name','')}} </p>
                    </div>  
                </div>      
            </div>
        </div>
    </div> 
   
    
    <div id="div_send_mail" class="row mt-3">
        <div class="col" style="text-align: end;">
            {{-- <button type="button" class="btn btn-inline cancel_button" data-dismiss="modal">
                Cancel
            </button> --}}
            <button type="submit" class="btn btn-inline submit_button btn-submit mr-0 btn-send">
                Send
            </button> 
        </div> 
    </div> 
</form>

<script>
    $(function(){
        // $('.select2').select2();
        $('#modal_page_footer').hide();
    });
    </script>
@endsection