/* Estilos para campos obrigatórios */
.mo-required-field {
    border: 3px solid #dc3545 !important;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.3) !important;
}
.mo-required-label {
    color: #dc3545 !important;
    font-weight: bold !important;
    font-size: 1.1em !important;
}
.mo-required-field:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.5) !important;
}
/* Indicador visual adicional */
.mo-required-indicator::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
    font-size: 1.2em;
}

.tool-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 30px 20px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tool-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tool-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.tool-title {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Bitter', serif;
    color: #212529;
    margin-bottom: 15px;
}

.tool-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.tool-button {
    border-radius: 6px;
    font-weight: 400;
    font-size: 15px !important;
    font-family: 'Roboto', sans-serif;
    padding: 7px 30px;
    border: none;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.tool-button:hover {
    transform: translateY(-1px);
    color: white;
}

/* Cores específicas para cada ferramenta */
.icon-merge { background: linear-gradient(45deg, #4285f4, #6c5ce7); }
.btn-merge { background: #4285f4; }
.btn-merge:hover { background: #3367d6; }

.icon-split { background: linear-gradient(45deg, #00d084, #00b894); }
.btn-split { background: #00d084; }
.btn-split:hover { background: #00b894; }

.icon-rotate { background: linear-gradient(45deg, #fdcb6e, #f39c12); }
.btn-rotate { background: #fdcb6e; color: #333; }
.btn-rotate:hover { background: #f39c12; color: white; }

.mo-alert-error { background: #f8d7da; border: 1px solid #f5c2c7; color: #842029; white-space: pre-line; padding: 10px; font-weight: 600; }
.mo-alert-success { background: #d1e7dd; border: 1px solid #badbcc; color: #0f5132; padding: 10px; font-weight: 600; }
.mo-alert-info { background: #cff4fc; border: 1px solid #b6effb; color: #055160; padding: 10px; font-weight: 600; }

/* Spinner */
.mo-spinner-border { display:inline-block; width: 1rem; height: 1rem; border: .15em solid currentColor; border-right-color: transparent; border-radius: 50%; margin-left: 8px; animation: mo-spinner .75s linear infinite; }
@keyframes mo-spinner { 100% { transform: rotate(360deg); } }

.icon-bookmark { background: linear-gradient(45deg, #48cae4, #0077be); }
.btn-bookmark { background: #48cae4; }
.btn-bookmark:hover { background: #0077be; }

.icon-insert { background: linear-gradient(45deg, #4285f4, #3367d6); }
.btn-insert { background: #4285f4; }
.btn-insert:hover { background: #3367d6; }

.icon-extract { background: linear-gradient(45deg, #6c757d, #495057); }
.btn-extract { background: #6c757d; }
.btn-extract:hover { background: #495057; }

.icon-ocr { background: linear-gradient(45deg, #17a2b8, #138496); }
.btn-ocr { background: #17a2b8; }
.btn-ocr:hover { background: #138496; }

.icon-summary { background: linear-gradient(45deg, #6f42c1, #563d7c); }
.btn-summary { background: #6f42c1; }
.btn-summary:hover { background: #563d7c; }

.icon-markdown { background: linear-gradient(45deg, #495057, #343a40); }
.btn-markdown { background: #495057; }
.btn-markdown:hover { background: #343a40; }

.icon-mindmap { background: linear-gradient(45deg, #fd7e14, #e8590c); }
.btn-mindmap { background: #fd7e14; }
.btn-mindmap:hover { background: #e8590c; }

.icon-docx { background: linear-gradient(45deg, #2b579a, #1e4074); }
.btn-docx { background: #2b579a; }
.btn-docx:hover { background: #1e4074; }

.icon-xlsx { background: linear-gradient(45deg, #107c41, #0e5c31); }
.btn-xlsx { background: #107c41; }
.mo-btn-success:hover { background: #218838; }
.mo-list { display: grid; gap: 8px; }
.mo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.mo-actions-row { display: flex; align-items: center; gap: 14px; margin: 8px 0; }

.mo-back-link { color: #6c757d; text-decoration: none; font-size: 14px; margin-top: 10px; }

.mo-back-link:hover { text-decoration: underline; color: #495057; }
.btn-csv { background: #17a2b8; }
.btn-csv:hover { background: #138496; }

.mo-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  -webkit-appearance: none; appearance: none;
  border: 1px solid transparent; border-radius: .375rem; /* 6px */
  padding: .375rem .75rem; /* Bootstrap default */
  font-size: 1rem; line-height: 1.5; font-weight: 400;
  text-align: center; vertical-align: middle; user-select: none;
  cursor: pointer;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  background-image: none !important; text-shadow: none !important;
}
.mo-btn:focus { outline: 0; box-shadow: 0 0 0 .25rem rgba(25, 135, 84, .25); }
.mo-btn:disabled { opacity: .65; cursor: not-allowed; }

/* Primary (Bootstrap 5) */
.mo-btn-primary { color: #fff !important; background-color: #0d6efd !important; border-color: #0d6efd !important; }
.mo-btn-primary:hover { color: #fff !important; background-color: #0b5ed7 !important; border-color: #0a58ca !important; }
.mo-btn-primary:focus { box-shadow: 0 0 0 .25rem rgba(13,110,253,.5) !important; }
.mo-btn-primary:active { color:#fff !important; background-color:#0a58ca !important; border-color:#0a53be !important; }

/* Success (Bootstrap 5) */
.mo-btn-success { color: #fff !important; background-color: #198754 !important; border-color: #198754 !important; }
.mo-btn-success:hover { color:#fff !important; background-color:#157347 !important; border-color:#146c43 !important; }
.mo-btn-success:focus { box-shadow: 0 0 0 .25rem rgba(25,135,84,.5) !important; }
.mo-btn-success:active { color:#fff !important; background-color:#146c43 !important; border-color:#13653f !important; }

/* Font Awesome icon spacing in buttons */
.mo-btn .fa-solid, .mo-btn .fas { margin-right: .5rem !important; }
.mo-btn-ico { display:inline-block; line-height:1; }
.mo-btn-text { display:inline-block; line-height:1.5; font-weight: 400; }

/* Specific tweaks for the upload action button */
#mo-upload-btn { margin-top: 12px !important; padding: 9.5px 22px !important; background-color: #000000 !important; border-color: #000000 !important; color: #fff !important; font-size: 0.9rem !important; }
#mo-upload-btn:hover { background-color: #111111 !important; border-color: #111111 !important; color: #fff !important; }
#mo-upload-btn .mo-btn-text { font-weight: 400 !important; }

#mo-generate-oficio { padding: 9.5px 22px !important; }
#mo-generate-oficio .mo-btn-text { font-weight: 400 !important; }

#mo-copy-text { padding: 9.5px 22px; }
#mo-copy-text .mo-btn-text { font-weight: 400; }

/* Top spacing for file input in the public upload form */
#mo-oficio-ic-upload-form input[type="file"] {
  margin-top: 20px;
  width: 100%;
  display: block;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dee2e6; /* 1px border */
  border-radius: 8px;       /* rounded corners */
  background-color: #fff;
}

#mo-oficio-ic-upload-form input[type="file"]:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.25);
}

/* Scoped modern file input style for Oficio-IC tool */
#oficio-ic-tool .sp-file {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid #dfe3e8 !important;
  background-color: #fff !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  color: #1f2937 !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
  height: 48px !important;
}

#oficio-ic-tool .sp-file:hover { border-color: #c9ced6 !important; }
#oficio-ic-tool .sp-file:focus { outline: none !important; border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important; }

/* Button (modern browsers) */
#oficio-ic-tool .sp-file::file-selector-button {
  margin-right: 12px !important;
  padding: 8px 14px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  background: #f9fafb !important;
  font: inherit !important;
  cursor: pointer !important;
  transition: background-color .15s ease, border-color .15s ease, transform .02s !important;
}
#oficio-ic-tool .sp-file::file-selector-button:hover { background: #f3f4f6 !important; border-color: #cbd5e1 !important; }
#oficio-ic-tool .sp-file::file-selector-button:active { transform: translateY(1px) !important; }

/* Fallback for older WebKit */
#oficio-ic-tool .sp-file::-webkit-file-upload-button {
  margin-right: 12px !important;
  padding: 8px 14px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  background: #f9fafb !important;
  font: inherit !important;
  cursor: pointer !important;
  transition: background-color .15s ease, border-color .15s ease, transform .02s !important;
}
#oficio-ic-tool .sp-file::-webkit-file-upload-button:hover { background: #f3f4f6 !important; border-color: #cbd5e1 !important; }
#oficio-ic-tool .sp-file::-webkit-file-upload-button:active { transform: translateY(1px) !important; }

#oficio-ic-tool .sp-file-chosen { display: block; margin-top: 6px; color: #6b7280; font-size: 14px; }

/* Oficio-IC: spacing and font-weight normalization for the custom file input */
#oficio-ic-tool .file-input-group { margin-top: 22px !important; }
#oficio-ic-tool .file-input-new .file-input-button,
#oficio-ic-tool .file-input-new .file-input-text-styled,
#oficio-ic-tool .file-input-new .file-input-label-styled { font-weight: 400 !important; }

/* Utility classes to use the same input pattern outside .mo-form */
.mo-input-std,
.mo-select-std,
.mo-textarea-std {
  width: 100%;
  display: block;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dee2e6; /* 1px border */
  border-radius: 8px;        /* rounded corners */
  background-color: #fff;
}

.mo-input-std:focus,
.mo-select-std:focus,
.mo-textarea-std:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.25);
}

.container-pdf-center {
    max-width: 1200px;
    padding: 40px 15px;
}

/* Responsividade */
@media (max-width: 768px) {
    .container-pdf-center {
        padding: 20px 15px;
    }
    
    .tool-card {
        padding: 25px 15px;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .tool-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .tool-description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .tool-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* --- Page Title Style --- */

.page-title-style {
    font-family: 'Bitter', serif;
    color: #dc3545; /* Vermelho */
    font-size: 36px;
    line-height: 42px;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 1.5rem; /* 24px */
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title-style i {
    font-size: 1.8rem; /* 28.8px */
}


/* --- Form Styles for Compare & Improve Modules --- */

.image-center-compare,
.image-center-improve {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.image-compare-form, 
.image-improve-form {
    max-width: 100%;
}

.form-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1rem; /* 16px */
    font-weight: 600;
    color: #343a40;
    margin-bottom: 1rem;
}

/* New File Input Style */
.file-input-group {
    margin-bottom: 1rem;
}

.file-input-new {
    position: relative;
    display: block;
    border: 1px solid #ced4da;
    border-radius: .25rem; /* 4px */
    background-color: #fff;
    cursor: pointer;
}

.file-input-new:hover {
    border-color: #80bdff;
}

.file-input-new .file-input-styled {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-new .file-input-label-styled {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
    height: calc(1.5em + .75rem + 2px); /* Match bootstrap input height */
}

.file-input-new .file-input-button {
    background-color: #e9ecef;
    border-right: 1px solid #ced4da;
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #495057;
    white-space: nowrap;
    border-radius: .25rem 0 0 .25rem;
}

.file-input-new .file-input-text-styled {
    padding: .375rem .75rem;
    font-size: 1rem;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* Action Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 34px;
}

.form-actions .btn-primary {
    color: #fff;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Cor específica para o botão Comparar */
.image-center-compare .form-actions .btn-primary {
    background-color: #4285f4;
    border-color: #4285f4;
}

.image-center-compare .form-actions .btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
}

/* Cor específica para o botão Melhorar */
.image-center-improve .form-actions .btn-primary {
    background-color: #00d084;
    border-color: #00d084;
}

.image-center-improve .form-actions .btn-primary:hover {
    background-color: #00b894;
    border-color: #00b894;
}

.form-actions .back-to-suite-link {
    color: #6c757d; /* Cinza */
    text-decoration: none;
    vertical-align: middle;
    font-size: 14px;
}

.form-actions .back-to-suite-link:hover {
    text-decoration: underline;
}

/* Progress Bar Styles */
.progress-container {
    margin-top: 20px;
    text-align: center;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-animation 2s infinite;
}
.progress-text {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

@keyframes progress-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.privacy-notice .fa-triangle-exclamation {
   color: #d62d20;
   font-size: 15px;
   margin-top: 1px;
   flex-shrink: 0;
}

.privacy-notice-text {
   flex: 1;
   font-weight: 500;
}

.privacy-notice-text strong {
   font-weight: 600;
   color: #2c2c2c;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
   .privacy-notice {
       font-size: 12px;
       padding: 10px 12px;
   }
   
   .privacy-notice .fa-triangle-exclamation {
       font-size: 14px;
   }
}

/* Bootstrap Form Enhancements */
.mo-form .form-label {
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.mo-form .form-control[readonly] {
  background-color: #f8f9fa;
  opacity: 1;
}

.mo-form .text-primary {
  color: #0d6efd !important;
}

.mo-form .border-bottom {
  border-bottom: 2px solid #dee2e6 !important;
}

.mo-form .fw-semibold {
  font-weight: 600 !important;
}