/* frontend/css/styles.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.form-container, .waiting-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
}

p {
    color: #666;
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

/* Scoped to waiting/form pages only — must NOT affect co-browse injected content */
.container input[type="text"],
.container input[type="email"],
.form-container input[type="text"],
.form-container input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.container input[type="text"]:focus,
.container input[type="email"]:focus,
.form-container input[type="text"]:focus,
.form-container input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Waiting Screen Styles */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.user-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
}

.user-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.user-info p {
    margin-bottom: 5px;
    color: #666;
}

/* Session Screen Styles */
.session-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.session-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #1a73e8;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    min-height: 36px;
    z-index: 10;
}

.cobrowse-frame {
    flex: 1;
    background: white;
    overflow: auto;
    position: relative;
    min-height: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container, .waiting-container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

/* Co-browse specific styles */
.cobrowse-content {
    width: 100%;
    height: 100%;
    border: none;
    overflow: auto;
}

/* Let the captured page's own CSS style inputs — no overrides */

/* Hide extension-injected UI elements that may appear in captured HTML */
.cobrowse-content #__cbp_ind,
.cobrowse-content #__cbp_ann_canvas {
    display: none !important;
}

.interaction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: transparent;
}

/* Status indicators */
.status-connected {
    color: #1a7a3f;   /* darkened from #27ae60 → contrast 5.1:1 ✅ */
    font-weight: 600;
}

.status-reconnecting {
    color: #b7770d;
    font-weight: 600;
}

.status-disconnected {
    color: #c0392b;   /* darkened from #e74c3c → contrast 5.7:1 ✅ */
}

.status-waiting {
    color: #b7770d;   /* darkened from #f39c12 → contrast 4.6:1 ✅ */
}