/**
 * ArcGIS Portal Authentication - Minimal Compact Styles
 */

/* ========================================
   TERMS POPUP (keep as is)
   ======================================== */

.arcgis-terms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.arcgis-terms-overlay.active {
    opacity: 1;
}

.arcgis-terms-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.arcgis-terms-overlay.active .arcgis-terms-modal {
    transform: scale(1);
}

.arcgis-terms-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 10;
    transition: color 0.2s ease, transform 0.2s ease;
}

.arcgis-terms-close:hover {
    color: #2b7de9;
    transform: rotate(90deg);
}

.arcgis-terms-header {
    padding: 30px 30px 20px 30px;
    border-bottom: 2px solid #e0e0e0;
}

.arcgis-terms-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.arcgis-terms-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    color: #333;
    line-height: 1.8;
    font-size: 15px;
}

.arcgis-terms-footer {
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.arcgis-terms-footer button {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.arcgis-terms-decline {
    background: #f5f5f5;
    color: #666;
}

.arcgis-terms-decline:hover {
    background: #e0e0e0;
    color: #333;
}

.arcgis-terms-accept {
    background: linear-gradient(135deg, #2b7de9 0%, #1a6dd9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(43, 125, 233, 0.3);
}

.arcgis-terms-accept:hover {
    background: linear-gradient(135deg, #1a6dd9 0%, #0f5cc9 100%);
    box-shadow: 0 6px 16px rgba(43, 125, 233, 0.4);
    transform: translateY(-2px);
}

/* ========================================
   WIDGET CONTAINER - MINIMAL
   ======================================== */

.arcgis-auth-widget {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.arcgis-loading-state {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* ========================================
   LOGIN CARD - TRANSPARENT & COMPACT
   ======================================== */

.arcgis-login-card {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: none;
    padding: 0;
}

.arcgis-login-header {
    text-align: center;
    padding: 0 0 15px 0;
    background: transparent;
}

.arcgis-login-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.arcgis-login-title {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
    margin: 10px 0 3px 0;
}

.arcgis-login-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.arcgis-login-form {
    padding: 0;
}

/* ========================================
   FORM ELEMENTS - COMPACT
   ======================================== */

.arcgis-form-group {
    margin-bottom: 10px;
}

.arcgis-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.arcgis-input {
    width: 100%;
    padding: 4px 5px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    transition: border-color 0.2s ease;
    outline: none;
}

.arcgis-input:focus {
    outline: none;
    border-color: #2b7de9;
}

.arcgis-input::placeholder {
    color: #999;
}

.arcgis-submit-btn {
    width: 100%;
    gap: 8px;
}

.arcgis-submit-btn:hover:not(:disabled) {
   
}

.arcgis-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.arcgis-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: arcgis-spin 0.8s linear infinite;
}

@keyframes arcgis-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   MESSAGE - COMPACT
   ======================================== */

.arcgis-message {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.arcgis-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.arcgis-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* ========================================
   USER DISPLAY - COMPACT & TRANSPARENT
   ======================================== */

.arcgis-user-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.arcgis-user-header {
    text-align: center;
    padding: 0 0 12px 0;
    background: transparent;
}

.arcgis-user-logo {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.arcgis-user-info {
    padding: 12px 0;
    text-align: center;
}

.arcgis-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px auto;
    border: 2px solid #ddd;
}

.arcgis-user-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2b7de9;
    color: white;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
}

.arcgis-user-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 3px 0;
}

.arcgis-user-role {
    font-size: 12px;
    color: #666;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.arcgis-user-email {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.arcgis-user-actions {
    padding: 12px 0 0 0;
}
.arcgis-portal-btn,
.arcgis-signout-btn {
    width: 100%;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.arcgis-portal-btn:hover:not(:disabled),
.arcgis-signout-btn:hover:not(:disabled) {
    background: #fff;
    border-color: #ff5252;
    color: #ff5252;
}
.arcgis-portal-btn:disabled,
.arcgis-signout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.arcgis-signout-icon {
    font-size: 16px;
}

/* ========================================
   RESPONSIVE - MINIMAL ADJUSTMENTS
   ======================================== */

@media (max-width: 480px) {
    .arcgis-login-logo,
    .arcgis-user-logo {
        max-width: 250px;
    }
    
    .arcgis-login-title {
        font-size: 18px;
    }
    
    .arcgis-user-name {
        font-size: 16px;
    }
}