/* Segunda Via Modal Styles */

/* Modal Transitions */
.modal-enter-active,
.modal-leave-active {
    transition: opacity 0.3s ease;
}

.modal-enter-from,
.modal-leave-to {
    opacity: 0;
}

.modal-enter-active .modal-container,
.modal-leave-active .modal-container {
    transition: transform 0.3s ease;
}

.modal-enter-from .modal-container,
.modal-leave-to .modal-container {
    transform: scale(0.95);
}

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

/* Modal Container */
.modal-container {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Modal Header */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #111827;
}

.close-button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-button:hover {
    background-color: #f3f4f6;
}

/* Modal Body */
.modal-body {
    padding: 0px 20px 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input.error {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 4px;
}

.help-text {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Table Styles */
.data-section {
    margin-top: 10px;
}

.data-section h3 {
    margin-bottom: 15px;
    color: #111827;
}

.table-container {
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table-container table thead {
    background-color: #f9fafb;
}

.table-container table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.table-container table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.table-container table tbody tr:hover {
    background-color: #f9fafb;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Trigger Button */
.trigger-button {
    background-color: #10b981;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.trigger-button:hover {
    background-color: #059669;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .table-container {
        font-size: 14px;
    }
    
    .table-container table th,
    .table-container table td {
        padding: 16px;
    }
}

.table-second-way {
    td {
        padding: 2px 6px;
    }
}
