/**
 * Styles for claims form - Updated for PHP 7.4 compatibility and improved UX
 * Reescrito y mejorado por Denialhost
 * @author Denialhost <https://www.denialhost.com>
 * Updated: 2024
 **/

/* ============================================
   GENERAL STYLES - Improved contrast & flow
   ============================================ */
#av_claims {
	padding: 2em 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
	color: #2c3e50;
	background: #f8f9fa;
	border-radius: 8px;
}

#av_claims .ctrl-holder {
	margin: 2.5em 0;
	background: #ffffff;
	padding: 1.5em;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	border: 1px solid #e1e8ed;
	transition: box-shadow 0.3s ease;
}

#av_claims .ctrl-holder:hover {
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ============================================
   UI WIDGET STYLES - Modern & Accessible
   ============================================ */
.ui-widget {
	font-size: 1em;
	font-family: inherit;
}

.ui-autocomplete {
	text-align: left;
	border: 2px solid #3498db !important;
	border-radius: 6px;
	background: #ffffff !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ui-autocomplete .ui-menu-item {
	border-bottom: 1px solid #ecf0f1;
}

.ui-autocomplete .ui-menu-item:last-child {
	border-bottom: none;
}

.ui-autocomplete .ui-state-hover,
.ui-autocomplete .ui-state-active {
	background: #3498db !important;
	color: #ffffff !important;
	cursor: pointer;
	border: none;
}

.ui-combobox-input {
	height: 2.5em;
	padding: 0.6em 1em;
	border: 2px solid #bdc3c7;
	border-radius: 6px;
	transition: border-color 0.3s ease;
}

.ui-combobox-input:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.ui-autocomplete-loading, 
#av_claims p.loading, 
#av_claims input.loading, 
.ajax-loading {
	background-image: url(../img/loading.gif);
	background-position: 95% center;
	background-repeat: no-repeat;
}

.homeCaso {
	background-image: url("../img/load.gif");
	background-position: 100% center;
	display: block;
}

/* ============================================
   FORM ELEMENTS - Better contrast & spacing
   ============================================ */
#av_claims label, 
#av_claims #claims_company .block-labels label {
	display: block;
	padding: 0.5em 0;
	color: #2c3e50;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 0.5em;
}

#av_claims .input-set label, 
#av_claims_ajax_create_form .input-set label {
	display: inline-block;
	color: #2c3e50;
	font-weight: 600;
	margin-right: 0.5em;
}

#av_claims .text-input, 
#av_claims textarea, 
.form-table .text-input, 
.form-table textarea {
	padding: 0.75em !important;
	border: 2px solid #bdc3c7 !important;
	border-radius: 6px;
	font-size: 1em;
	color: #2c3e50;
	background: #ffffff;
	transition: all 0.3s ease;
	width: 100%;
	max-width: 100%;
	font-family: inherit;
}

#av_claims .text-input:focus, 
#av_claims textarea:focus {
	outline: none;
	border-color: #3498db !important;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-table .text-input, 
.form-table textarea {
	width: 100%;
	max-width: 30em;
	padding: 0.75em !important;
	border-color: #3498db !important;
	color: #2c3e50;
}

.form-table td, 
.form-table th {
	margin: 0.8em 0;
	padding: 1em;
}

.form-table th {
	text-align: right;
	vertical-align: top;
	color: #2c3e50;
	font-weight: 600;
	width: 30%;
}

.form-table td {
	text-align: left;
}

.form-table select {
	width: 100%;
	max-width: 30em;
	padding: 0.75em;
	border: 2px solid #bdc3c7;
	border-radius: 6px;
	background: #ffffff;
	color: #2c3e50;
	font-size: 1em;
	font-family: inherit;
	transition: border-color 0.3s ease;
}

.form-table select:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ============================================
   BUTTONS - Modern & Accessible
   ============================================ */
.ui-button {
	padding: 0.75em 1.5em !important;
	font-size: 1em !important;
	font-weight: 600 !important;
	color: #ffffff !important;
	background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
	border: none !important;
	border-radius: 6px !important;
	cursor: pointer;
	transition: all 0.3s ease !important;
	text-transform: none !important;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ui-button:hover {
	background: linear-gradient(135deg, #2980b9 0%, #21618c 100%) !important;
	box-shadow: 0 4px 8px rgba(0,0,0,0.3);
	transform: translateY(-1px);
}

.ui-button:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ui-button .ui-button-text {
	padding: 0 !important;
}

#claims_submit.button-primary {
	background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
	padding: 1em 2em !important;
	font-size: 1.1em !important;
	font-weight: 700 !important;
	border-radius: 6px;
	box-shadow: 0 4px 6px rgba(39, 174, 96, 0.3);
}

#claims_submit.button-primary:hover {
	background: linear-gradient(135deg, #229954 0%, #1e8449 100%) !important;
	box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

#add_claim_proof, 
#claim_from_create, 
#claim_from_search {
	margin-left: 10px;
	padding: 0.6em 1.2em !important;
	float: none !important;
	font-size: 0.95em !important;
	text-transform: none !important;
	background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
}

#add_claim_proof:hover, 
#claim_from_create:hover, 
#claim_from_search:hover {
	background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%) !important;
	text-decoration: none !important;
}

/* ============================================
   TABS & ACCORDIONS - Smooth transitions
   ============================================ */
.ui-tabs-nav {
	background: #ecf0f1 !important;
	border: none !important;
	border-radius: 6px 6px 0 0;
	padding: 0.5em 0.5em 0 0.5em;
}

.ui-tabs-nav li {
	border-radius: 6px 6px 0 0;
	margin-right: 0.25em;
}

.ui-tabs-nav li a {
	padding: 0.75em 1.5em;
	color: #2c3e50;
	font-weight: 600;
	transition: all 0.3s ease;
}

.ui-tabs-nav li.ui-state-active a {
	background: #3498db !important;
	color: #ffffff !important;
}

.ui-tabs-nav li:not(.ui-state-active) a:hover {
	background: #bdc3c7;
	color: #2c3e50;
}

/* Estilos específicos para el título "Reclamante" en las pestañas */
.ui-tabs-nav li.tabs-title {
	list-style: none;
	margin-right: 1em;
	padding: 0.75em 0;
	color: #2c3e50 !important;
	font-weight: 700;
	font-size: 1.1em;
	background: transparent !important;
	border: none !important;
}

.ui-tabs-nav li.tabs-title a {
	color: #2c3e50 !important;
	background: transparent !important;
	padding: 0;
	cursor: default;
	pointer-events: none;
}

.ui-tabs-nav li.tabs-title:hover {
	background: transparent !important;
}

.ui-tabs .ui-tabs-panel {
	padding: 2em;
	border: 2px solid #3498db !important;
	border-top: none !important;
	border-radius: 0 0 6px 6px;
	background: #ffffff !important;
}

/* Asegurar contraste adecuado para todos los elementos de tabs */
.ui-tabs-nav li.ui-state-default {
	background: #ecf0f1 !important;
	color: #2c3e50 !important;
}

.ui-tabs-nav li.ui-state-default a {
	color: #2c3e50 !important;
	background: #ecf0f1 !important;
}

.ui-tabs-nav li.ui-state-default:hover {
	background: #d5dbdb !important;
}

.ui-tabs-nav li.ui-state-default:hover a {
	color: #2c3e50 !important;
	background: #d5dbdb !important;
}

.ui-accordion-header {
	margin: 0.5em 0 !important;
	padding: 1em 1.5em !important;
	background: #ecf0f1 !important;
	border: 2px solid #bdc3c7 !important;
	border-radius: 6px !important;
	cursor: pointer;
	transition: all 0.3s ease;
	font-weight: 600;
	color: #2c3e50;
}

.ui-accordion-header:hover {
	background: #d5dbdb !important;
	border-color: #3498db !important;
}

.ui-accordion-header.ui-state-active {
	background: #3498db !important;
	color: #ffffff !important;
	border-color: #2980b9 !important;
}

.field_content {
	border: 2px solid #3498db !important;
	border-top: none !important;
	border-radius: 0 0 6px 6px;
	background: #ffffff !important;
	padding: 1.5em 2em !important;
	margin-bottom: 1em;
}

/* ============================================
   CHECKBOXES & RADIO BUTTONS
   ============================================ */
.entry ul.block-labels {
	margin: 1em 0 1.5em 1.5em !important;
	list-style: none;
}

.entry ul.block-labels li {
	padding: 0.5em 0;
	background: none;
}

#av_claims .block-labels li {
	margin: 0.75em 0;
	padding: 0.5em;
	border-radius: 4px;
	transition: background 0.2s ease;
}

#av_claims .block-labels li:hover {
	background: #ecf0f1;
}

#av_claims .block-labels li input[type="checkbox"] {
	margin-right: 0.75em;
	float: left !important;
	width: 20px;
	height: 20px;
	cursor: pointer;
	accent-color: #3498db;
}

#av_claims .block-labels li label {
	cursor: pointer;
	color: #2c3e50;
	font-weight: 500;
	padding: 0;
	margin: 0;
}

/* ============================================
   MESSAGES & ALERTS - High contrast
   ============================================ */
.claims-alert, 
.claims-highlight {
	margin: 1.5em 0 2em;
	border-radius: 6px;
	overflow: hidden;
}

.claims-alert .ui-state-error {
	background: #e74c3c !important;
	color: #ffffff !important;
	border: 2px solid #c0392b !important;
	padding: 1em 1.5em;
}

.claims-alert .ui-state-error a {
	color: #ffffff;
	font-weight: bold;
	text-decoration: underline;
}

.claims-highlight .ui-state-highlight {
	background: #3498db !important;
	color: #ffffff !important;
	border: 2px solid #2980b9 !important;
	padding: 1em 1.5em;
}

.claims-alert p, 
.claims-highlight p {
	margin: 0.8em 0 !important;
	padding-left: 2.5em;
	color: inherit;
}

.claims-alert .ui-icon, 
.claims-highlight .ui-icon {
	float: left !important;
	margin-right: 0.5em;
	margin-top: 0.2em;
}

/* ============================================
   FILE UPLOAD AREA
   ============================================ */
.claim_proof {
	margin-top: 1.5em;
	margin-bottom: 1.5em;
	padding: 1.5em;
	background: #f8f9fa;
	border: 2px dashed #bdc3c7;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.claim_proof:hover {
	border-color: #3498db;
	background: #ecf0f1;
}

#av_claims .claim_proof label, 
#av_claims #claims_company label {
	display: inline-block;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 0.5em;
}

#av_claims #claims_company .claim_to {
	margin-bottom: 1.5em;
}

#av_claims #claims_company input.claim_to {
	margin-bottom: 0.5em;
}

.form-hint {
	margin: 1em 0 0 !important;
	font-size: 0.9em;
	font-weight: 500;
	color: #7f8c8d;
	text-align: left;
	line-height: 1.5;
}

.form-file-types {
	margin-top: 1.5em;
	line-height: 32px;
}

.form-file-types span {
	display: inline-block;
	width: 24px;
	height: 32px;
	text-indent: -9999em;
	text-align: left;
	margin-right: 0.5em;
	vertical-align: middle;
}

.form-file-types .avi { background-image: url(../img/avi.gif); }
.form-file-types .doc { background-image: url(../img/doc.gif); }
.form-file-types .jpg { background-image: url(../img/jpg.gif); }
.form-file-types .mov { background-image: url(../img/mov.gif); }
.form-file-types .mp3 { background-image: url(../img/mp3.gif); }
.form-file-types .pdf { background-image: url(../img/pdf.gif); }
.form-file-types .ppt { background-image: url(../img/ppt.gif); }
.form-file-types .psd { background-image: url(../img/psd.gif); }
.form-file-types .txt { background-image: url(../img/txt.gif); }
.form-file-types .wmv { background-image: url(../img/wmv.gif); }
.form-file-types .xls { background-image: url(../img/xls.gif); }
.form-file-types .zip { background-image: url(../img/zip.gif); }

/* ============================================
   TEXTAREA & DESCRIPTION
   ============================================ */
#claim_description_text {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 1em auto;
	min-height: 200px;
	resize: vertical;
}

#chars_left {
	color: #7f8c8d;
	font-size: 0.9em;
	margin-top: 0.5em;
}

#chars_left_count {
	font-weight: 700;
	color: #3498db;
}

/* ============================================
   COMPANY SEARCH AREA
   ============================================ */
#claims_company label {
	padding-top: 0.5em;
	float: left;
	font-weight: 600;
}

#claims_company .block-labels {
	padding-top: 2em;
	clear: both;
}

#claims_company .block-labels label {
	padding: 0;
	float: none;
}

#claims_company input.text-input {
	width: 100%;
	max-width: 300px;
}

#claims_company .ui-content {
	padding-top: 2em;
	background: #ffffff !important;
}

/* ============================================
   PERSON FORM
   ============================================ */
#natural_person_create {
	padding: 1em 0 1.5em;
}

#legal_person label {
	padding-bottom: 0.6em;
	font-weight: 600;
}

#av_claims_data_person_meta_phone_code, 
#av_claims_data_company_meta_phone_code {
	width: 4em;
	margin-right: 0.75em;
}

#av_claims_data_person_meta_phone_phone, 
#av_claims_data_company_meta_phone_phone {
	width: 10em;
}

/* ============================================
   DIALOGS
   ============================================ */
.ui-dialog {
	border: 2px solid #3498db !important;
	background: #ffffff !important;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.ui-dialog-titlebar {
	background: #3498db !important;
	color: #ffffff !important;
	padding: 1em 1.5em;
	border-radius: 6px 6px 0 0;
}

.ui-dialog-titlebar .ui-dialog-title {
	color: #ffffff;
	font-weight: 700;
}

.ui-dialog .ui-dialog-content {
	padding: 2em;
}

.ui-dialog .ui-dialog-content p {
	margin-bottom: 1.5em;
	line-height: 1.6;
}

/* ============================================
   CASES TABLE
   ============================================ */
#closed_claims {
	width: 100%;
	margin: 2em 0;
	font-family: inherit;
	font-size: 0.95em;
	border-collapse: collapse;
}

#closed_claims .even td {
	background-color: #f8f9fa;
}

#closed_claims .tr-hover td {
	background-color: #fff3cd;
	cursor: pointer;
	transition: background 0.2s ease;
}

#closed_claims th, 
#closed_claims td {
	padding: 1em;
	border: 1px solid #e1e8ed;
}

#closed_claims th {
	font-weight: 700;
	color: #ffffff;
	background: #2c3e50;
	text-transform: uppercase;
	text-align: left;
}

/* ============================================
   CLAIM DETAIL
   ============================================ */
#claim_detail {
	font-size: 0.95em !important;
	width: 100%;
	margin-bottom: 2em;
}

#claim_detail h3 {
	margin: 0 0 1.5em;
	font-size: 1.2em;
	text-align: left;
	text-transform: uppercase;
	color: #2c3e50;
	font-weight: 700;
}

#claim_detail table {
	width: 100%;
	margin-bottom: 2em;
	border-collapse: collapse;
}

#claim_detail th, 
#claim_detail td {
	vertical-align: top;
	padding: 1.2em;
	border-bottom: 2px solid #ecf0f1;
}

#claim_detail tr:last-child th, 
#claim_detail tr:last-child td {
	border-bottom: none;
}

#claim_detail th {
	width: 30%;
	border-right: 2px solid #ecf0f1;
	font-weight: 700;
	text-align: right;
	color: #2c3e50;
	background: #f8f9fa;
}

#claim_detail td {
	text-align: left;
	color: #34495e;
}

#claim_detail ul, 
#claim_detail ol {
	padding-left: 2em;
}

#claim_detail ul li {
	list-style: disc;
	margin: 0.5em 0;
}

#claim_justification {
	padding: 1em;
	max-height: 8em;
	overflow: auto;
	border: 2px solid #bdc3c7;
	background: #f8f9fa;
	border-radius: 4px;
	line-height: 1.6;
}

#claim_detail .claim-file-meta {
	font-size: 0.85em;
	color: #7f8c8d;
	font-style: italic;
}

/* ============================================
   FILTERS
   ============================================ */
#claims_filter label {
	display: block;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 0.5em;
}

#claims_filter table {
	width: 100%;
}

#claims_filter th, 
#claims_filter td {
	padding: 1em;
	vertical-align: middle;
}

#claims_filter th {
	width: 25%;
	padding-right: 2%;
	text-align: right;
	color: #2c3e50;
	font-weight: 600;
}

#claims_filter td {
	width: 73%;
}

#claims_filter select {
	max-width: 30em;
}

/* ============================================
   LOADING STATES
   ============================================ */
#av_claims .hidden {
	display: none;
}

#av_claims img.loading {
	display: inline-block;
	margin-left: 0.5em;
	vertical-align: middle;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
	#av_claims .ctrl-holder {
		padding: 1em;
	}
	
	.form-table th,
	.form-table td {
		display: block;
		width: 100%;
		text-align: left;
	}
	
	.form-table th {
		margin-bottom: 0.5em;
		padding-bottom: 0;
	}
	
	.ui-tabs .ui-tabs-panel {
		padding: 1em;
	}
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
.ui-state-focus {
	outline: 3px solid #3498db;
	outline-offset: 2px;
}

*:focus-visible {
	outline: 3px solid #3498db;
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	#av_claims {
		border: 2px solid #000000;
	}
	
	#av_claims .text-input,
	#av_claims textarea,
	#av_claims select {
		border-width: 3px;
		border-color: #000000;
	}
	
	.ui-button {
		border: 3px solid #000000 !important;
	}
}
