/**
 * AnonReport - Frontend Styles
 * Design minimalista com tons de preto
 */

/* ========================================
   CSS Variables
======================================== */
:root {
    --anon-black: #1a1a1a;
    --anon-black-hover: #2d2d2d;
    --anon-black-light: #404040;
    --anon-gray: #6b6b6b;
    --anon-gray-light: #f5f5f5;
    --anon-gray-medium: #e5e5e5;
    --anon-white: #ffffff;
    --anon-border: #e0e0e0;
    --anon-success: #10b981;
    --anon-success-light: #d1fae5;
    --anon-warning: #f59e0b;
    --anon-warning-light: #fef3c7;
    --anon-error: #ef4444;
    --anon-error-light: #fee2e2;
    --anon-radius: 8px;
    --anon-radius-lg: 12px;
    --anon-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --anon-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --anon-transition: 0.2s ease;
}

/* ========================================
   Base Wrapper
======================================== */
.anon-form-wrapper,
.anon-tracker-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   Form Styles
======================================== */
.anon-form {
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: var(--anon-radius-lg);
    padding: 32px;
    box-shadow: var(--anon-shadow);
}

/* Field Container */
.anon-field {
    margin-bottom: 20px;
}

.anon-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--anon-black);
    margin-bottom: 8px;
}

.anon-required {
    color: var(--anon-error);
    margin-left: 2px;
}

.anon-optional {
    font-weight: 400;
    color: var(--anon-gray);
    font-size: 13px;
}

/* Inputs */
.anon-field input[type="text"],
.anon-field input[type="email"],
.anon-field input[type="tel"],
.anon-field input[type="number"],
.anon-field input[type="date"],
.anon-field input[type="datetime-local"],
.anon-field textarea,
.anon-field select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--anon-black);
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: var(--anon-radius);
    transition: border-color var(--anon-transition), box-shadow var(--anon-transition);
    box-sizing: border-box;
}

.anon-field input:focus,
.anon-field textarea:focus,
.anon-field select:focus {
    outline: none;
    border-color: var(--anon-black);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.anon-field textarea {
    resize: vertical;
    min-height: 100px;
}

.anon-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Field Error */
.anon-field-error {
    display: block;
    font-size: 13px;
    color: var(--anon-error);
    margin-top: 6px;
    min-height: 18px;
}

.anon-field.has-error input,
.anon-field.has-error textarea,
.anon-field.has-error select {
    border-color: var(--anon-error);
}

/* ========================================
   File Upload
======================================== */
.anon-file-upload {
    position: relative;
}

.anon-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.anon-file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed var(--anon-border);
    border-radius: var(--anon-radius);
    background: var(--anon-gray-light);
    text-align: center;
    transition: all var(--anon-transition);
}

.anon-file-upload:hover .anon-file-upload-label,
.anon-file-upload.dragover .anon-file-upload-label {
    border-color: var(--anon-black);
    background: var(--anon-white);
}

.anon-file-upload-label svg {
    width: 32px;
    height: 32px;
    color: var(--anon-gray);
    margin-bottom: 8px;
}

.anon-file-upload-label span {
    font-size: 14px;
    color: var(--anon-black);
    margin-bottom: 4px;
}

.anon-file-upload-label small {
    font-size: 12px;
    color: var(--anon-gray);
}

/* File Preview */
.anon-file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--anon-gray-light);
    border-radius: var(--anon-radius);
    margin-top: 8px;
}

.anon-file-name {
    font-size: 14px;
    color: var(--anon-black);
    word-break: break-all;
}

.anon-file-remove {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--anon-gray);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--anon-transition);
}

.anon-file-remove:hover {
    color: var(--anon-error);
}

/* Small file upload variant */
.anon-file-upload-small .anon-file-upload-label {
    flex-direction: row;
    padding: 12px 16px;
    gap: 8px;
}

.anon-file-upload-small .anon-file-upload-label svg {
    width: 20px;
    height: 20px;
    margin-bottom: 0;
}

.anon-file-upload-small .anon-file-upload-label span {
    margin-bottom: 0;
}

/* ========================================
   Buttons
======================================== */
.anon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    border: none;
    border-radius: var(--anon-radius);
    cursor: pointer;
    transition: all var(--anon-transition);
    text-decoration: none;
}

.anon-btn-primary {
    background: var(--anon-black);
    color: var(--anon-white);
}

.anon-btn-primary:hover {
    background: var(--anon-black-hover);
}

.anon-btn-primary:active {
    transform: scale(0.98);
}

.anon-btn-secondary {
    background: var(--anon-gray-light);
    color: var(--anon-black);
    border: 1px solid var(--anon-border);
}

.anon-btn-secondary:hover {
    background: var(--anon-gray-medium);
}

.anon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.anon-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.anon-spinner {
    width: 18px;
    height: 18px;
    animation: anon-spin 1s linear infinite;
}

@keyframes anon-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Form Actions & Disclaimer
======================================== */
.anon-form-actions {
    margin-top: 24px;
}

.anon-form-actions .anon-btn {
    width: 100%;
}

.anon-form-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: var(--anon-gray-light);
    border-radius: var(--anon-radius);
    font-size: 13px;
    color: var(--anon-gray);
}

.anon-form-disclaimer svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Form Error */
.anon-form-error {
    padding: 12px 16px;
    background: var(--anon-error-light);
    border: 1px solid var(--anon-error);
    border-radius: var(--anon-radius);
    color: var(--anon-error);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ========================================
   Success Message
======================================== */
.anon-success-message {
    text-align: center;
    padding: 40px 32px;
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: var(--anon-radius-lg);
    box-shadow: var(--anon-shadow);
}

.anon-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--anon-success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anon-success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--anon-success);
}

.anon-success-message h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--anon-black);
    margin: 0 0 8px;
}

.anon-success-message > p {
    color: var(--anon-gray);
    margin: 0 0 20px;
}

/* Token Display */
.anon-token-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: var(--anon-gray-light);
    border-radius: var(--anon-radius);
    margin-bottom: 16px;
}

.anon-token-value {
    font-size: 24px;
    font-weight: 600;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: var(--anon-black);
    letter-spacing: 2px;
}

.anon-copy-token {
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all var(--anon-transition);
}

.anon-copy-token:hover {
    background: var(--anon-black);
    border-color: var(--anon-black);
}

.anon-copy-token:hover svg {
    color: var(--anon-white);
}

.anon-copy-token svg {
    width: 20px;
    height: 20px;
    color: var(--anon-gray);
    display: block;
}

.anon-copy-token.copied {
    background: var(--anon-success);
    border-color: var(--anon-success);
}

.anon-copy-token.copied svg {
    color: var(--anon-white);
}

.anon-token-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--anon-radius);
    margin-bottom: 16px;
    text-align: left;
}

.anon-token-warning-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.anon-token-warning-icon svg {
    width: 24px;
    height: 24px;
    color: #dc2626;
}

.anon-token-warning-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.anon-token-warning-content strong {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
}

.anon-token-warning-content span {
    font-size: 13px;
    color: #7f1d1d;
    line-height: 1.5;
    font-weight: 500;
}

/* Response Time */
.anon-response-time {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 20px;
    background: var(--anon-success-light);
    border: 1px solid #86efac;
    border-radius: var(--anon-radius);
    margin-bottom: 24px;
}

.anon-response-time svg {
    width: 20px;
    height: 20px;
    color: var(--anon-success);
    flex-shrink: 0;
}

.anon-response-time span {
    font-size: 14px;
    color: #166534;
    font-weight: 400;
}

.anon-response-time strong {
    color: #15803d;
}

/* Success Actions */
.anon-success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anon-success-actions .anon-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.anon-success-actions .anon-track-report {
    gap: 8px;
}

.anon-success-actions .anon-track-report svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========================================
   Tracker - Search
======================================== */
.anon-tracker-search {
    text-align: center;
    padding: 40px 32px;
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: var(--anon-radius-lg);
    box-shadow: var(--anon-shadow);
}

.anon-tracker-search-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: var(--anon-gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anon-tracker-search-icon svg {
    width: 28px;
    height: 28px;
    color: var(--anon-black);
}

.anon-tracker-search h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--anon-black);
    margin: 0 0 8px;
}

.anon-tracker-search > p {
    color: var(--anon-gray);
    margin: 0 0 24px;
    font-size: 15px;
}

/* Tracker Form */
.anon-tracker-input-group {
    display: flex;
    gap: 12px;
}

.anon-tracker-input-group input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid var(--anon-border);
    border-radius: var(--anon-radius);
    transition: all var(--anon-transition);
}

.anon-tracker-input-group input:focus {
    outline: none;
    border-color: var(--anon-black);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.anon-tracker-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--anon-error-light);
    border-radius: var(--anon-radius);
    color: var(--anon-error);
    font-size: 14px;
}

/* ========================================
   Tracker - Result
======================================== */
.anon-tracker-result {
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: var(--anon-radius-lg);
    box-shadow: var(--anon-shadow);
    overflow: hidden;
}

/* Result Header */
.anon-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--anon-gray-light);
    border-bottom: 1px solid var(--anon-border);
}

.anon-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--anon-gray);
    cursor: pointer;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: var(--anon-radius);
    transition: all var(--anon-transition);
}

.anon-back-btn:hover {
    background: var(--anon-white);
    color: var(--anon-black);
}

.anon-back-btn svg {
    width: 16px;
    height: 16px;
}

/* Status Badge */
.anon-status-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--anon-white);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Result Content */
.anon-result-content {
    padding: 24px;
}

/* Result Section */
.anon-result-section {
    margin-bottom: 32px;
}

.anon-result-section:last-child {
    margin-bottom: 0;
}

.anon-result-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--anon-black);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--anon-border);
}

.anon-result-section h3 svg {
    width: 18px;
    height: 18px;
    color: var(--anon-gray);
}

/* Result Fields */
.anon-result-fields {
    display: grid;
    gap: 12px;
}

.anon-result-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.anon-result-field-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--anon-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anon-result-field-value {
    font-size: 15px;
    color: var(--anon-black);
    line-height: 1.5;
}

/* ========================================
   Timeline
======================================== */
.anon-timeline {
    position: relative;
    padding-left: 28px;
}

.anon-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--anon-border);
}

.anon-timeline-empty {
    padding: 24px;
    text-align: center;
    color: var(--anon-gray);
    font-size: 14px;
    background: var(--anon-gray-light);
    border-radius: var(--anon-radius);
    margin-left: -28px;
}

/* Timeline Item */
.anon-timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.anon-timeline-item:last-child {
    padding-bottom: 0;
}

/* Timeline Marker */
.anon-timeline-marker {
    position: absolute;
    left: -28px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--anon-white);
    border: 2px solid var(--anon-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anon-timeline-marker svg {
    width: 12px;
    height: 12px;
    color: var(--anon-gray);
}

.anon-timeline-item--admin .anon-timeline-marker {
    background: var(--anon-black);
    border-color: var(--anon-black);
}

.anon-timeline-item--admin .anon-timeline-marker svg {
    color: var(--anon-white);
}

.anon-timeline-item[data-type="status_change"] .anon-timeline-marker {
    background: var(--anon-warning);
    border-color: var(--anon-warning);
}

.anon-timeline-item[data-type="status_change"] .anon-timeline-marker svg {
    color: var(--anon-white);
}

/* Timeline Content */
.anon-timeline-content {
    background: var(--anon-gray-light);
    border-radius: var(--anon-radius);
    padding: 16px;
}

.anon-timeline-item--admin .anon-timeline-content {
    background: var(--anon-black);
    color: var(--anon-white);
}

/* Timeline Header */
.anon-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.anon-timeline-author {
    font-weight: 600;
}

.anon-timeline-item--admin .anon-timeline-author {
    color: var(--anon-white);
}

.anon-timeline-date {
    color: var(--anon-gray);
}

.anon-timeline-item--admin .anon-timeline-date {
    color: rgba(255, 255, 255, 0.6);
}

/* Timeline Message */
.anon-timeline-message {
    font-size: 14px;
    line-height: 1.6;
}

/* Timeline Status Change */
.anon-timeline-status-change {
    font-size: 14px;
    padding: 8px 12px;
    background: var(--anon-warning-light);
    border-radius: 6px;
    color: var(--anon-black);
}

/* Timeline Load More */
.anon-timeline-load-more {
    text-align: center;
    padding-bottom: 16px;
    margin-left: -28px;
}

.anon-timeline-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--anon-gray);
    cursor: pointer;
    transition: all var(--anon-transition);
}

.anon-timeline-load-more-btn:hover {
    background: var(--anon-gray-light);
    color: var(--anon-black);
}

.anon-timeline-load-more-btn svg {
    width: 16px;
    height: 16px;
}

.anon-timeline-load-more-btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.anon-timeline-load-more-btn.is-loading svg {
    animation: anon-spin 1s linear infinite;
}

/* Timeline Attachment */
.anon-timeline-attachment {
    margin-top: 12px;
}

.anon-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--anon-white);
    border: 1px solid var(--anon-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--anon-black);
    text-decoration: none;
    transition: all var(--anon-transition);
}

.anon-attachment-link:hover {
    background: var(--anon-gray-light);
}

.anon-attachment-link svg {
    width: 14px;
    height: 14px;
}

.anon-timeline-item--admin .anon-attachment-link {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--anon-white);
}

.anon-timeline-item--admin .anon-attachment-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Add Message Section
======================================== */
.anon-add-message-section {
    background: var(--anon-gray-light);
    margin: 0 -24px -24px;
    padding: 24px;
    border-top: 1px solid var(--anon-border);
}

.anon-add-message-section h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}

.anon-add-message-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--anon-border);
    border-radius: var(--anon-radius);
    resize: vertical;
    min-height: 80px;
    transition: all var(--anon-transition);
    box-sizing: border-box;
}

.anon-add-message-form textarea:focus {
    outline: none;
    border-color: var(--anon-black);
}

.anon-add-message-form .anon-field {
    margin-bottom: 12px;
}

.anon-add-message-form .anon-btn {
    margin-top: 8px;
}

/* ========================================
   Notice
======================================== */
.anon-notice {
    padding: 16px;
    border-radius: var(--anon-radius);
    font-size: 14px;
}

.anon-notice-warning {
    background: var(--anon-warning-light);
    color: var(--anon-black);
    border: 1px solid var(--anon-warning);
}

/* ========================================
   Image Preview
======================================== */
.anon-timeline-image-preview {
    margin-top: 12px;
    margin-bottom: 8px;
}

.anon-timeline-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity var(--anon-transition);
}

.anon-timeline-image-preview img:hover {
    opacity: 0.9;
}

.anon-timeline-item--admin .anon-timeline-image-preview img {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   Lightbox
======================================== */
.anon-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anon-lightbox--active {
    opacity: 1;
}

.anon-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.anon-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.anon-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.anon-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--anon-white);
    font-size: 32px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--anon-transition);
    padding: 0;
    line-height: 1;
}

.anon-lightbox-close:hover {
    opacity: 1;
}

/* ========================================
   Responsive
======================================== */
/* ========================================
   Radio Buttons
======================================== */
.anon-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anon-radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--anon-gray-light);
    border: 1px solid transparent;
    border-radius: var(--anon-radius);
    transition: all var(--anon-transition);
}

.anon-radio-option:hover {
    background: var(--anon-gray-medium);
}

.anon-radio-option input[type="radio"] {
    display: none;
}

.anon-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--anon-border);
    border-radius: 50%;
    background: var(--anon-white);
    position: relative;
    flex-shrink: 0;
    transition: all var(--anon-transition);
}

.anon-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--anon-black);
    border-radius: 50%;
    transition: transform var(--anon-transition);
}

.anon-radio-option input[type="radio"]:checked + .anon-radio-custom {
    border-color: var(--anon-black);
}

.anon-radio-option input[type="radio"]:checked + .anon-radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.anon-radio-option input[type="radio"]:checked ~ .anon-radio-label {
    font-weight: 500;
}

.anon-radio-label {
    font-size: 15px;
    color: var(--anon-black);
}

/* ========================================
   Checkboxes
======================================== */
.anon-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anon-checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--anon-gray-light);
    border: 1px solid transparent;
    border-radius: var(--anon-radius);
    transition: all var(--anon-transition);
}

.anon-checkbox-option:hover {
    background: var(--anon-gray-medium);
}

.anon-checkbox-option input[type="checkbox"] {
    display: none;
}

.anon-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--anon-border);
    border-radius: 4px;
    background: var(--anon-white);
    position: relative;
    flex-shrink: 0;
    transition: all var(--anon-transition);
}

.anon-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid var(--anon-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--anon-transition);
}

.anon-checkbox-option input[type="checkbox"]:checked + .anon-checkbox-custom {
    background: var(--anon-black);
    border-color: var(--anon-black);
}

.anon-checkbox-option input[type="checkbox"]:checked + .anon-checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.anon-checkbox-option input[type="checkbox"]:checked ~ .anon-checkbox-label {
    font-weight: 500;
}

.anon-checkbox-label {
    font-size: 15px;
    color: var(--anon-black);
}

/* ========================================
   Rating Stars
======================================== */
.anon-rating-group {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}

.anon-rating-star {
    cursor: pointer;
    transition: all var(--anon-transition);
}

.anon-rating-star svg {
    width: 32px;
    height: 32px;
    color: var(--anon-border);
    transition: all var(--anon-transition);
}

.anon-rating-star:hover svg,
.anon-rating-star.active svg {
    color: #fbbf24;
}

.anon-rating-star:hover svg {
    transform: scale(1.1);
}

.anon-rating-group:hover .anon-rating-star.active svg {
    color: var(--anon-border);
}

.anon-rating-group:hover .anon-rating-star:hover svg,
.anon-rating-group:hover .anon-rating-star:hover ~ .anon-rating-star svg {
    color: var(--anon-border);
}

.anon-rating-group:hover .anon-rating-star:hover svg,
.anon-rating-group .anon-rating-star:hover ~ .anon-rating-star svg {
    color: var(--anon-border);
}

.anon-rating-group:hover .anon-rating-star:hover svg {
    color: #fbbf24;
}

/* Fix hover behavior for rating */
.anon-rating-group .anon-rating-star {
    position: relative;
}

.anon-rating-group:not(:hover) .anon-rating-star.active svg {
    color: #fbbf24;
}

/* Hover fills stars up to hovered one */
.anon-rating-group:hover .anon-rating-star svg {
    color: var(--anon-border);
}

.anon-rating-group .anon-rating-star:hover svg,
.anon-rating-group .anon-rating-star:has(~ .anon-rating-star:hover) svg {
    color: #fbbf24 !important;
}

/* Date and DateTime fields */
.anon-field--date input,
.anon-field--datetime input {
    cursor: pointer;
}

.anon-field--date input::-webkit-calendar-picker-indicator,
.anon-field--datetime input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 4px;
    margin-right: -4px;
    border-radius: 4px;
    transition: background var(--anon-transition);
}

.anon-field--date input::-webkit-calendar-picker-indicator:hover,
.anon-field--datetime input::-webkit-calendar-picker-indicator:hover {
    background: var(--anon-gray-light);
}

/* CPF and CNPJ fields */
.anon-field--cpf input,
.anon-field--cnpj input {
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 1px;
}

/* Number field */
.anon-field--number input {
    -moz-appearance: textfield;
}

.anon-field--number input::-webkit-outer-spin-button,
.anon-field--number input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 640px) {
    .anon-form-wrapper,
    .anon-tracker-wrapper {
        padding: 16px;
    }

    .anon-form,
    .anon-tracker-search,
    .anon-success-message {
        padding: 24px 20px;
    }

    .anon-tracker-input-group {
        flex-direction: column;
    }

    .anon-tracker-input-group .anon-btn {
        width: 100%;
    }

    .anon-token-value {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .anon-result-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .anon-timeline {
        padding-left: 24px;
    }

    .anon-timeline-marker {
        left: -24px;
        width: 16px;
        height: 16px;
    }

    .anon-timeline-marker svg {
        width: 10px;
        height: 10px;
    }

    .anon-timeline::before {
        left: 7px;
    }

    /* Rating responsivo */
    .anon-rating-star svg {
        width: 28px;
        height: 28px;
    }

    /* Radio e Checkbox responsivos */
    .anon-radio-option,
    .anon-checkbox-option {
        padding: 10px 14px;
    }
}
