/* Dota 2 Chat Bind Generator Custom Styles */

/* Key Detection Animation */
.key-detecting {
    animation: pulse-border 1s infinite;
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

@keyframes pulse-border {
    0%,
    100% {
        border-color: #dc2626;
    }
    50% {
        border-color: #f87171;
    }
}

/* Bind Item Cards */
.bind-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
}

.bind-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #dc2626;
}

.bind-item.editing {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.bind-key {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: #1f2937;
    color: white;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.bind-type-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: capitalize;
}

.bind-type-say_team {
    background-color: #dbeafe;
    color: #1e40af;
}

.bind-type-say {
    background-color: #dcfce7;
    color: #166534;
}

.bind-type-chatwheel_say {
    background-color: #fef3c7;
    color: #92400e;
}

.bind-type-voice_line {
    background-color: #e0e7ff;
    color: #3730a3;
}

.bind-type-custom {
    background-color: #f3e8ff;
    color: #7c3aed;
}

.bind-message {
    font-style: italic;
    color: #6b7280;
    margin: 0.5rem 0;
}

.bind-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.bind-action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.bind-action-edit {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.bind-action-edit:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.bind-action-delete {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.bind-action-delete:hover {
    background-color: #fee2e2;
    border-color: #f87171;
}

/* Command Output Styling */
.command-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.command-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 0.5rem;
}

.command-code {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875rem;
    word-break: break-all;
    position: relative;
    overflow-x: auto;
}

.command-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem;
    background-color: #374151;
    color: #9ca3af;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.command-copy-btn:hover {
    background-color: #4b5563;
    color: #f3f4f6;
}

.command-copied {
    background-color: #10b981 !important;
    color: white !important;
}

/* Toggle Switch Custom Styling */
.toggle-bg {
    transition: background-color 0.2s;
}

/* Character Counter */
.char-limit-warning {
    color: #f59e0b !important;
}

.char-limit-error {
    color: #dc2626 !important;
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast.success {
    border-left: 4px solid #10b981;
}

.notification-toast.error {
    border-left: 4px solid #dc2626;
}

.notification-toast.warning {
    border-left: 4px solid #f59e0b;
}

/* Key Validation Styling */
.key-valid {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

.key-invalid {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

/* Stats Animation */
.stats-show {
    display: grid !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Advanced Form Styling */
.form-group-advanced .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-group-advanced .form-input {
    transition: all 0.2s;
}

.form-group-advanced .form-input:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .bind-actions {
        flex-direction: column;
    }

    .command-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .notification-toast {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        transform: translateY(100%);
    }

    .notification-toast.show {
        transform: translateY(0);
    }
}

/* Preset Card Hover Effects */
.preset-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.preset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Advanced Tooltip */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 0.25rem;
}

.tooltip:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #1f2937;
    z-index: 10;
}

/* Keyboard Styling */
kbd {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
