/* =============================================
   TRAYON - Components Styles
   Estilos de componentes reutilizáveis
   ============================================= */

/* ===== FEATURE BOX ===== */
.feature-box {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.feature-box:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

.feature-box-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.feature-box-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.feature-box-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.feature-box-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #d1d5db;
}

/* ===== CARD ===== */
.card {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(6, 182, 212, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(6, 182, 212, 0.1);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.card-body {
    margin-bottom: 1rem;
}

.card-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(6, 182, 212, 0.1);
}

/* ===== BUTTON VARIANTS ===== */
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #22d3ee, #60a5fa);
    box-shadow: 0 6px 25px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #22d3ee;
    font-weight: 600;
    border: 2px solid #06b6d4;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: #22d3ee;
    transform: translateY(-2px);
}

.btn-outline {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: white;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-cyan {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-green {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-yellow {
    background: rgba(250, 204, 21, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-purple {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ===== STATS BOX ===== */
.stats-box {
    text-align: center;
    padding: 1.5rem;
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(6, 182, 212, 0.1);
    border-radius: 0.75rem;
}

.stats-box-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stats-box-label {
    font-size: 0.875rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== PROGRESS BAR ===== */
.progress {
    width: 100%;
    height: 0.5rem;
    background: rgba(17, 24, 39, 0.5);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.progress-bar-animated {
    background-size: 200% 100%;
    animation: progressShift 2s linear infinite;
}

@keyframes progressShift {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-input::placeholder {
    color: #6b7280;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    font-size: 0.875rem;
    color: #f87171;
    margin-top: 0.5rem;
}

.form-hint {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* ===== ALERT ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-warning {
    background: rgba(250, 204, 21, 0.1);
    color: #fde047;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(135deg, #0a0e27, #1a1f3a);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(6, 182, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.modal-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #f87171;
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(6, 182, 212, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===== FOOTER SPECIFIC ===== */
.footer-link {
    color: #9ca3af;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #22d3ee;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 50%;
    color: #22d3ee;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(6, 182, 212, 0.2);
    transform: translateY(-3px);
}

.social-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: rgba(17, 24, 39, 0.95);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(6, 182, 212, 0.2);
    border-top-color: #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
}

/* Debug Console Styles */
.debug-console {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 300px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.debug-header {
    background: #2d2d2d;
    padding: 10px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.debug-header h4 {
    margin: 0;
    font-size: 14px;
    color: #00ff88;
}

.btn-close {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
}

.debug-output {
    padding: 10px;
    height: 200px;
    overflow-y: auto;
    background: #000;
    color: #00ff88;
    line-height: 1.4;
    white-space: pre-wrap;
}

.btn-clear {
    background: #333;
    border: 1px solid #555;
    color: #fff;
    padding: 5px 10px;
    margin: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.btn-clear:hover {
    background: #444;
}

.debug-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #ff6b35;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
}

.debug-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.debug-console.hidden {
    display: none;
}
