/* ==========================================================================
   Modal Moderno - Estilo global para los modales Bootstrap 3 del aplicativo
   (No modifica anchos: se respetan modal-sm, modal-lg y anchos inline)
   ========================================================================== */

/* Contenedor */
.modal .modal-content {
  border-radius: 8px;
  border: none;
  background: #f8f9fa;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal .modal-content > :first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.modal .modal-content > :last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Header */
.modal .modal-header {
  background: #2c3e50;
  color: #fff;
  border-bottom: 3px solid #3498db;
  padding: 20px 25px;
}

.modal .modal-header .modal-title {
  color: #fff !important;
  font-weight: 600;
  font-size: 20px;
}

.modal .modal-header .modal-title > .fa,
.modal .modal-header .modal-title > .glyphicon {
  margin-right: 10px;
  color: #3498db;
}

.modal .modal-header .modal-subtitle {
  margin: 5px 0 0 30px;
  font-size: 12px;
  color: #bdc3c7;
}

.modal .modal-header .close {
  color: #fff;
  opacity: 0.8;
  text-shadow: none;
}

.modal .modal-header .close:hover,
.modal .modal-header .close:focus {
  color: #fff;
  opacity: 1;
}

/* Body */
.modal .modal-body {
  padding: 25px;
  background: #f8f9fa;
}

/* Footer */
.modal .modal-footer {
  background: #ecf0f1;
  border-top: 1px solid #dde4e9;
  padding: 15px 25px;
}

/* Botones */
.modal .modal-footer .btn {
  border-radius: 4px;
  padding: 8px 20px;
  font-weight: 600;
}

.modal .modal-footer .btn-default {
  border: 1px solid #bdc3c7;
  background: #fff;
  color: #7f8c8d;
}

.modal .modal-footer .btn-default:hover {
  background: #f8f9fa;
  border-color: #95a5a6;
}

.modal .modal-footer .btn-primary {
  padding: 8px 25px;
  background: #3498db;
  border: none;
  box-shadow: 0 3px 0 #2980b9;
}

.modal .modal-footer .btn-primary:hover {
  background: #2980b9;
  box-shadow: 0 3px 0 #1f618d;
}

/* Inputs */
.modal .form-control:focus {
  border-color: #3498db;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(52, 152, 219, 0.4);
}

.modal .help-block {
  color: #95a5a6;
  font-size: 11px;
  margin-top: 5px;
}

/* ==========================================================================
   Componentes reutilizables (opt-in por clase)
   ========================================================================== */

/* Etiqueta de campo en mayusculas con icono */
.modal .modal-label {
  color: #34495e;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal .modal-label > .fa {
  color: #3498db;
  margin-right: 5px;
}

/* Input group con addon integrado */
.modal .modal-input-group .input-group-addon {
  background: #ecf0f1;
  border: 1px solid #dde4e9;
  border-right: none;
  color: #7f8c8d;
}

.modal .modal-input-group .form-control {
  border: 1px solid #dde4e9;
  border-left: none;
  box-shadow: none;
  height: 42px;
  background: #fff;
  transition: all 0.3s;
}

.modal .modal-input-group .form-control:focus {
  border-color: #3498db;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(52, 152, 219, 0.4);
}

/* Zona de carga de archivos (drag & drop) */
.modal .modal-dropzone {
  border: 2px dashed #bdc3c7;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 5px;
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.modal .modal-dropzone:hover {
  border-color: #3498db;
  background: #f0f8ff;
}

.modal .modal-dropzone.is-dragover {
  border-color: #3498db;
  background: #e8f4fd;
}

.modal .modal-dropzone.has-file {
  border-color: #27ae60;
  background: #f0fff4;
}

.modal .modal-dropzone .modal-dropzone-icon {
  font-size: 40px;
  color: #3498db;
  margin-bottom: 10px;
}

.modal .modal-dropzone .modal-dropzone-title {
  margin-bottom: 5px;
  color: #2c3e50;
}

.modal .modal-dropzone .modal-dropzone-hint {
  color: #7f8c8d;
  font-size: 12px;
  margin-bottom: 0;
}

.modal .modal-dropzone .modal-file-info {
  display: none;
  margin-top: 15px;
  margin-bottom: 0;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
}

.modal .modal-dropzone.has-file .modal-file-info {
  display: block;
}

.modal .modal-file-info .close {
  margin-left: 5px;
  font-size: 16px;
  line-height: 1;
  opacity: 0.5;
}

.modal .modal-file-info .close:hover {
  opacity: 1;
}

.modal .modal-file-hidden {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Grupo de opciones tipo boton con radio */
.modal .modal-option-group {
  display: flex;
}

.modal .modal-option + .modal-option {
  margin-left: 10px;
}

.modal .modal-option {
  flex: 1;
  position: relative;
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

.modal .modal-option input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.modal .modal-option-box {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 2px solid #dde4e9;
  border-radius: 6px;
  background: #fff;
  color: #34495e;
  font-weight: 600;
  transition: all 0.2s;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.modal .modal-option-box small {
  display: block;
  font-weight: normal;
  font-size: 11px;
  color: #95a5a6;
}

.modal .modal-option-radio {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 2px solid #bdc3c7;
  border-radius: 50%;
  background: #fff;
  position: relative;
  transition: all 0.2s;
}

.modal .modal-option:hover .modal-option-box {
  border-color: #3498db;
}

.modal .modal-option input[type=radio]:focus + .modal-option-box {
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

.modal .modal-option input[type=radio]:checked + .modal-option-box {
  border-color: #3498db;
  background: #eaf4fc;
  color: #2c3e50;
}

.modal .modal-option input[type=radio]:checked + .modal-option-box .modal-option-radio {
  border-color: #3498db;
}

.modal .modal-option input[type=radio]:checked + .modal-option-box .modal-option-radio:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3498db;
}

/* Panel informativo */
.modal .modal-info-panel {
  margin-top: 20px;
  margin-bottom: 0;
  background: #ecf0f1;
  border: none;
  border-radius: 4px;
  box-shadow: none;
}

.modal .modal-info-panel .panel-body {
  padding: 12px;
  color: #2c3e50;
}

.modal .modal-info-panel .fa {
  color: #3498db;
  margin-right: 8px;
}

/* Tamaño propio del modal de firma digital */
#modalP12 .modal-dialog {
  width: 500px;
}
