.cloudxm-nfe-meta-box .status-issued { color: #46b450; }
.cloudxm-nfe-meta-box .status-authorized { color: #46b450; }
.cloudxm-nfe-meta-box .status-cancelled { color: #dc3232; }
.cloudxm-nfe-meta-box .status-processing { color: #ffb900; }
.cloudxm-nfe-meta-box .status-failed { color: #dc3232; }
.cloudxm-nfe-meta-box .status-error { color: #dc3232; }
.cloudxm-nfe-meta-box .status-scheduled { color: #0073aa; }
.cloudxm-nfe-meta-box .status-async_pending { color: #0073aa; }
.cloudxm-nfe-meta-box .cloudxm-nfe-info p { margin: 5px 0; font-size: 12px; }
.cloudxm-nfe-meta-box .cloudxm-nfe-info code {
    background: none;
    padding: 0;
    border: none;
    font-size: inherit;
    color: inherit;
}
.cloudxm-nfe-meta-box .cloudxm-nfe-actions { margin-top: 15px; }
.cloudxm-nfe-meta-box .cloudxm-nfe-actions button { margin-right: 5px; margin-bottom: 5px; }
.cloudxm-nfe-meta-box .cloudxm-nfe-code-break {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: block;
}
.cloudxm-nfe-meta-box .button-small-danger { color: #dc3232; }
.cloudxm-nfe-meta-box button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}
.cloudxm-nfe-meta-box button:disabled:hover {
    opacity: 0.5;
    cursor: not-allowed;
}

.cloudxm-nfe-description-section {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.cloudxm-nfe-description-section .cloudxm-nfe-description-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    flex-wrap: wrap;
}

.cloudxm-nfe-description-section .cloudxm-nfe-line-column-count {
    font-size: 11px;
    color: #666;
}

.cloudxm-nfe-description-section .cloudxm-nfe-line-column-count span {
    font-weight: 600;
}

.cloudxm-nfe-description-section .cloudxm-nfe-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
    min-height: 80px;
}

.cloudxm-nfe-description-section .cloudxm-nfe-textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.cloudxm-nfe-description-section .cloudxm-nfe-textarea[readonly] {
    background-color: #f5f5f5;
    color: #555;
    cursor: not-allowed;
    border-color: #ddd;
}

.cloudxm-nfe-description-section .cloudxm-nfe-textarea[readonly]:focus {
    border-color: #ddd;
    box-shadow: none;
}

.cloudxm-nfe-description-section .cloudxm-nfe-character-count {
    font-size: 11px;
    color: #666;
}

.cloudxm-nfe-description-section #cloudxm-nfe-desc-validation-error {
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 12px;
}

.cloudxm-nfe-description-section #cloudxm-nfe-desc-validation-error.notice-warning {
    border-left-color: #ffb900;
}

.cloudxm-nfe-description-section #cloudxm-nfe-desc-validation-error p {
    margin: 0;
}

.cloudxm-nfe-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloudxm-nfe-modal {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    padding: 25px;
    animation: cloudxm-nfe-modal-slide-in 0.3s ease-out;
}

@keyframes cloudxm-nfe-modal-slide-in {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cloudxm-nfe-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #23282d;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.cloudxm-nfe-modal-content {
    margin-bottom: 20px;
}

.cloudxm-nfe-modal-content > div {
    margin-bottom: 12px;
}

.cloudxm-nfe-modal-content > div:last-child {
    margin-bottom: 0;
}

.cloudxm-nfe-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    margin-top: 15px;
}

.cloudxm-nfe-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: cloudxm-nfe-spinner-rotate 0.8s linear infinite;
}

@keyframes cloudxm-nfe-spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cloudxm-nfe-spinner.error {
    animation: none;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloudxm-nfe-spinner.error::before {
    content: '';
    width: 40px;
    height: 40px;
    display: block;
}

.cloudxm-nfe-spinner.error svg {
    width: 40px;
    height: 40px;
}

.cloudxm-nfe-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-top: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.cloudxm-nfe-textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.cloudxm-nfe-character-count {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: -5px;
}

.cloudxm-nfe-character-count span {
    font-weight: 600;
}

.cloudxm-nfe-modal label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.cloudxm-nfe-modal label .required {
    color: #dc3232;
}

.cloudxm-nfe-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin-bottom: 15px;
}

.cloudxm-nfe-modal-header h2 {
    margin: 0;
    padding: 0;
    font-size: 18px;
}

.cloudxm-nfe-modal-title-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}

.cloudxm-nfe-modal-title-close:hover {
    color: #dc3232;
}

#cloudxm-nfe-loading-modal .cloudxm-nfe-modal {
    padding: 20px;
}

#cloudxm-nfe-loading-modal .cloudxm-nfe-modal-content {
    min-height: 40px;
}

.cloudxm-nfe-btn-tooltip {
    position: relative;
    display: inline-block;
}

.cloudxm-nfe-btn-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1d2327;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    max-width: 320px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 99999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cloudxm-nfe-btn-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1d2327;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 99999;
}

.cloudxm-nfe-btn-tooltip:hover::after,
.cloudxm-nfe-btn-tooltip:hover::before {
    opacity: 1;
}

.cloudxm-nfe-scheduled-info {
    background: #fff3cd;
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #ffc107;
    border-radius: 3px;
}

.cloudxm-nfe-scheduled-info p {
    margin: 4px 0;
}

.cloudxm-nfe-scheduled-info p:first-child {
    margin-top: 0;
}

.cloudxm-nfe-scheduled-info p:last-child {
    margin-bottom: 0;
}

.cloudxm-nfe-issuance-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cloudxm-nfe-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
}

.cloudxm-nfe-schedule-options {
    margin-bottom: 15px;
}

.cloudxm-nfe-schedule-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 10px;
    cursor: pointer;
}

.cloudxm-nfe-schedule-options input[type="radio"] {
    margin-right: 8px;
}

.cloudxm-nfe-schedule-options .description {
    margin-left: 4px;
    color: #666;
    font-size: 13px;
}

#schedule-date-time {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

#schedule-date-time:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.cloudxm-nfe-schedule-date-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.cloudxm-nfe-datetime-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    min-width: 250px;
}

.cloudxm-nfe-datetime-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.cloudxm-nfe-datetime-input[readonly] {
    background-color: #f5f5f5;
    color: #555;
    cursor: not-allowed;
    border-color: #ddd;
}

.cloudxm-nfe-datetime-input[readonly]:focus {
    border-color: #ddd;
    box-shadow: none;
}
