/**
 * Dealoware MVP Stage C Basic UI - Styles
 * Issue #69: Basic authenticated Participant UI
 * 
 * Simple, functional styling for MVP basic UI.
 * Not a security boundary - all authorization server-side.
 */

/* Reset and Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Header */
#app-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

#auth-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

#auth-status button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

#auth-status button:hover {
    background: rgba(255,255,255,0.3);
}

/* Main Content */
#app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
#app-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-btn {
    background: #ecf0f1;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #555;
}

.nav-btn:hover {
    background: #d5dbdb;
}

.nav-btn.active {
    background: #3498db;
    color: white;
}

/* Sections */
.section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.section h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
    font-size: 1.1rem;
}

/* Auth Forms */
.auth-forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.form-group {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea, select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button[type="submit"], .edit-form button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button[type="submit"]:hover, .edit-form button:hover {
    background: #2980b9;
}

/* Result Boxes */
.result-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.result-box.success {
    background: #d4edda;
    border-color: #c3e6cb;
}

.result-box.error {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.result-box code {
    background: rgba(0,0,0,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
}

/* Data Display */
.data-display {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.data-display p {
    margin-bottom: 0.5rem;
}

.data-display code {
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Data Lists */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.data-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.data-item[onclick] {
    cursor: pointer;
}

.data-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.data-item p {
    color: #666;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.data-item code {
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85rem;
}

.data-item.discoverable {
    border-left: 3px solid #27ae60;
}

/* Detail View */
.detail-view {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #3498db;
    margin-top: 1rem;
}

.detail-view h3 {
    color: #3498db;
    margin-bottom: 1rem;
}

.detail-view button {
    margin-top: 1rem;
    background: #95a5a6;
}

.detail-view button:hover {
    background: #7f8c8d;
}

.offer-item {
    background: #ecf0f1;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Edit Forms */
.edit-form {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Status Colors */
.success { color: #27ae60; }
.error { color: #e74c3c; }
.warning { color: #f39c12; }

/* Notes */
.note {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 1rem;
}

/* Empty State */
.empty {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    #app-main {
        padding: 1rem;
    }
    
    .auth-forms {
        grid-template-columns: 1fr;
    }
    
    #app-nav {
        justify-content: center;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}
