/* OAuth-Style Modal Styling */

/* Account Selection */
.oauth-accounts {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.oauth-accounts-title {
    font-size: 16px;
    font-weight: 500;
    color: #5f6368;
    margin: 0 0 16px;
    text-align: center;
}

.oauth-account-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.oauth-account-item:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.oauth-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.oauth-account-info {
    flex: 1;
    min-width: 0;
}

.oauth-account-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oauth-account-email {
    font-size: 13px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oauth-account-divider {
    text-align: center;
    margin: 20px 0 16px;
    position: relative;
}

.oauth-account-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #dadce0;
}

.oauth-account-divider span {
    position: relative;
    background: white;
    padding: 0 12px;
    font-size: 13px;
    color: #5f6368;
}

/* Facebook account items */
.oauth-modal.facebook .oauth-account-item:hover {
    border-color: #1877f2;
}

.oauth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.oauth-modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Google OAuth Modal */
.oauth-modal.google {
    font-family: 'Roboto', Arial, sans-serif;
}

.oauth-modal.google .oauth-header {
    padding: 24px 24px 0;
    text-align: center;
}

.oauth-modal.google .oauth-logo {
    width: 75px;
    height: 75px;
    margin: 0 auto 16px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.oauth-modal.google .oauth-title {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 8px;
}

.oauth-modal.google .oauth-subtitle {
    font-size: 16px;
    color: #5f6368;
    margin: 0 0 24px;
}

.oauth-modal.google .oauth-body {
    padding: 0 24px 24px;
}

.oauth-modal.google .oauth-form-group {
    margin-bottom: 20px;
}

.oauth-modal.google .oauth-label {
    display: block;
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 8px;
    font-weight: 500;
}

.oauth-modal.google .oauth-input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    color: #202124;
    transition: all 0.2s;
    box-sizing: border-box;
}

.oauth-modal.google .oauth-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.oauth-modal.google .oauth-error {
    color: #d93025;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.oauth-modal.google .oauth-error.show {
    display: block;
}

.oauth-modal.google .oauth-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.oauth-modal.google .oauth-btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.oauth-modal.google .oauth-btn-cancel {
    background: transparent;
    color: #1a73e8;
}

.oauth-modal.google .oauth-btn-cancel:hover {
    background: rgba(26, 115, 232, 0.04);
}

.oauth-modal.google .oauth-btn-submit {
    background: #1a73e8;
    color: white;
}

.oauth-modal.google .oauth-btn-submit:hover {
    background: #1765cc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.oauth-modal.google .oauth-btn-submit:disabled {
    background: #dadce0;
    color: #80868b;
    cursor: not-allowed;
}

/* Facebook OAuth Modal */
.oauth-modal.facebook {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.oauth-modal.facebook .oauth-header {
    background: #1877f2;
    padding: 24px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.oauth-modal.facebook .oauth-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.oauth-modal.facebook .oauth-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0 0 4px;
}

.oauth-modal.facebook .oauth-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.oauth-modal.facebook .oauth-body {
    padding: 24px;
}

.oauth-modal.facebook .oauth-form-group {
    margin-bottom: 16px;
}

.oauth-modal.facebook .oauth-label {
    display: block;
    font-size: 13px;
    color: #1c1e21;
    margin-bottom: 6px;
    font-weight: 600;
}

.oauth-modal.facebook .oauth-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    font-size: 15px;
    color: #1c1e21;
    transition: all 0.2s;
    box-sizing: border-box;
}

.oauth-modal.facebook .oauth-input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.oauth-modal.facebook .oauth-error {
    color: #f02849;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.oauth-modal.facebook .oauth-error.show {
    display: block;
}

.oauth-modal.facebook .oauth-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.oauth-modal.facebook .oauth-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    flex: 1;
}

.oauth-modal.facebook .oauth-btn-cancel {
    background: #e4e6eb;
    color: #050505;
}

.oauth-modal.facebook .oauth-btn-cancel:hover {
    background: #d8dadf;
}

.oauth-modal.facebook .oauth-btn-submit {
    background: #1877f2;
    color: white;
}

.oauth-modal.facebook .oauth-btn-submit:hover {
    background: #166fe5;
}

.oauth-modal.facebook .oauth-btn-submit:disabled {
    background: #e4e6eb;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* Privacy Notice */
.oauth-privacy {
    font-size: 11px;
    color: #65676b;
    text-align: center;
    margin-top: 16px;
    line-height: 1.4;
}

.oauth-privacy a {
    color: #1877f2;
    text-decoration: none;
}

.oauth-privacy a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .oauth-modal {
        width: 95%;
        max-width: none;
    }
    
    .oauth-modal.google .oauth-header,
    .oauth-modal.google .oauth-body {
        padding: 20px;
    }
    
    .oauth-modal.facebook .oauth-header,
    .oauth-modal.facebook .oauth-body {
        padding: 20px;
    }
    
    .oauth-modal.google .oauth-title {
        font-size: 20px;
    }
    
    .oauth-modal.facebook .oauth-title {
        font-size: 18px;
    }
}