/**
 * Estilos de componentes
 * Plataforma SaaS Email Marketing
 */

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #4ade80;
    border-color: #4ade80;
    color: #fff;
}

.btn-primary:hover {
    background-color: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.btn-success {
    background-color: #4ade80;
    border-color: #4ade80;
}

.btn-success:hover {
    background-color: #22c55e;
    border-color: #22c55e;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* Forms */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: #4ade80;
    box-shadow: 0 0 0 0.2rem rgba(74, 222, 128, 0.25);
}

.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert i {
    margin-right: 0.5rem;
}

/* Modals */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-close:hover {
    opacity: 1;
}

/* Dropdowns */
.dropdown-menu {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-header {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #6c757d;
    padding: 0.5rem 1.25rem;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #4ade80;
    background-color: #f0fdf4;
}

.file-upload-area.dragover {
    border-color: #4ade80;
    background-color: #dcfce7;
}

.file-upload-icon {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

/* Progress */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #2d3142;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    background-color: #4ade80 !important;
}

.progress-bar.bg-success {
    background-color: #4ade80 !important;
}

.progress-bar-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Condition Builder */
.condition-row {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

/* DataTables Customization */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_length select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_paginate .paginate_button {
    border-radius: 6px;
    margin: 0 0.25rem;
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    border-radius: 6px;
    border: 1px solid #ced4da;
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* Summernote Editor */
.note-editor {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.note-editor.note-frame .note-editing-area .note-editable {
    min-height: 300px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Tooltips */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: #212529;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

/* Toast Notifications */
.toast {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .footer,
    .btn,
    .dropdown {
        display: none !important;
    }
    
    main.main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

