/* ==========================================
   Developer Dashboard & OAuth Styles
   ========================================== */

/* ==========================================
   Developer Dashboard Twemoji Styles
   ========================================== */

.app-icon img.emoji {
    height: 1.5rem;
    width: 1.5rem;
    vertical-align: middle;
}

.developer-icon img.emoji {
    height: 1.75rem;
    width: 1.75rem;
    vertical-align: middle;
}

.quick-icon img.emoji {
    height: 1.1rem;
    width: 1.1rem;
    vertical-align: -0.1em;
}

.empty-icon img.emoji {
    height: 3rem;
    width: 3rem;
    vertical-align: middle;
}

.modal-header h2 img.emoji {
    height: 1.25rem;
    width: 1.25rem;
    vertical-align: -0.1em;
}

.section-header h2 img.emoji {
    height: 1.25rem;
    width: 1.25rem;
    vertical-align: -0.1em;
}

.header-content h1 img.emoji {
    height: 1.75rem;
    width: 1.75rem;
    vertical-align: -0.1em;
}

/* Developer Container */
.developer-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Developer Header */
.developer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.header-content h1 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.header-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Developer Section */
.developer-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Apps List */
.apps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

.app-card:hover {
    border-color: var(--accent-primary);
}

.app-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.app-details {
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.app-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
}

.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-label {
    font-weight: 500;
    color: var(--text-muted);
}

.meta-warning {
    color: var(--warning);
}

.client-id,
.key-prefix {
    background: var(--bg-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
}

.copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

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

.redirect-uris,
.scopes-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.uri-badge,
.scope-badge {
    background: var(--bg-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
}

.scope-badge {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-secondary);
}

.app-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.app-website {
    color: var(--accent-secondary);
    text-decoration: none;
    font-size: 0.85rem;
}

.app-website:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
}

.empty-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem !important;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.2s ease;
}

.modal-content.modal-sm {
    max-width: 400px;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-actions button {
    flex: 1;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: var(--accent-primary);
}

.radio-option input,
.checkbox-option input {
    margin-top: 0.15rem;
}

.radio-label {
    font-size: 0.9rem;
}

.radio-label strong {
    display: block;
    margin-bottom: 0.2rem;
}

/* Secret Display */
.secret-display-container {
    padding: 1.5rem;
}

.secret-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--warning);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.secret-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.secret-box code {
    flex: 1;
    word-break: break-all;
    font-size: 0.85rem;
    font-family: monospace;
}

.copy-btn-lg {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.copy-btn-lg:hover {
    opacity: 0.9;
}

/* Button Variants */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.btn-warning:hover {
    background: rgba(234, 179, 8, 0.25);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Developer Quick Section (Account Page) */
.developer-quick-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.developer-quick-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.developer-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.developer-info {
    flex: 1;
}

.developer-info h2 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem 0;
}

.developer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.developer-quick-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.quick-link:hover {
    background: var(--bg-hover);
}

.quick-icon {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .developer-header {
        flex-direction: column;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn {
        flex: 1;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .app-card {
        flex-direction: column;
    }
    
    .app-actions {
        flex-direction: row;
        width: 100%;
    }
    
    .app-actions button {
        flex: 1;
    }
    
    .app-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .developer-quick-header {
        flex-direction: column;
        text-align: center;
    }
    
    .developer-quick-links {
        flex-direction: column;
    }
    
    .quick-link {
        justify-content: center;
    }
}
