/* 
 * PowerOn | Multi-Agent Service - Modern Bright Theme
 * CSS Variables sind in styles_variables.css definiert
 */

/* ===== GRUNDLEGENDE RESETS UND BASIS-STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-size: cover;
  color: var(--color-text);
  line-height: 1.6;
  font-size: 14px;
  background: var(--color-bg);
}

/* ===== LAYOUT COMPONENTS ===== */
.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.module-container {
  flex: 1;
  padding: 1rem;
  overflow: auto;
  background-color: var(--color-bg);
  position: relative;
  z-index: 1;
}

/* Common module view styles */
/* Removed height: 100% to allow natural expansion and scrolling */
#prompts-view, #mandates-view, #users-view, #files-view {
  display: flex;
  flex-direction: column;
}

/* Button styles - specific extensions */
/* .add-btn is now defined in styles_base.css alongside .btn-primary */
/* Both classes share the same styles - no additional definitions needed here */

/* Responsive Design */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  
  .main-content {
    height: calc(100vh - 4rem);
  }
  
  .module-container {
    padding: 0.5rem;
  }
  
  .card {
    margin-bottom: 0.5rem;
  }
}

/* Ensure content is visible on small screens */
@media (max-height: 600px) {
  .module-container {
    min-height: auto;
  }
}

/* ===== AUTHENTICATION FORMS ===== */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--color-bg);
    border-radius: 25px;
    box-shadow: inset 0 0 0 1px rgba(199,197,178,.15), 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(199,197,178,.15);
}

.login-container h1 {
    text-align: center;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-family: var(--font-family);
}

.login-form-group {
    margin-bottom: 1rem;
}

.login-form-group label {
    /* Base label styles from styles_base.css */
    margin-bottom: 0.5rem;
}

.login-form-group input {
    /* Base input styles from styles_base.css - font-size override for login */
    font-size: 1rem;
}

/* Login button modifier - adds full width and specific sizing */
.login-btn {
    width: 100%;
    font-size: 1rem;
    height: 50px;
    border-radius: 25px;
}

.register-options {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Register button modifier - adds full width and flex layout */
.register-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    height: 50px;
    border-radius: 25px;
}

/* Microsoft/Google button styling - specific override for OAuth buttons */
.msft-btn {
    background-color: #2f2f2f;
    color: var(--color-bg);
    border-color: #2f2f2f;
}

.msft-btn:hover {
    background-color: #1f1f1f;
    border-color: #1f1f1f;
}

.register-link {
    margin-top: 1rem;
    text-align: center;
    color: var(--color-gray);
    font-family: var(--font-family);
}

.register-link a {
    color: var(--color-secondary);
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

.login-error-message {
    color: var(--color-red);
    background-color: var(--color-red-disabled);
    border: 1px solid var(--color-red);
    padding: 12px;
    margin-bottom: 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    display: none; /* Hide by default */
    font-family: var(--font-family);
}

.login-error-message:not(:empty) {
    display: block; /* Show only when there's content */
}

.field-error {
    color: var(--color-red);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none; /* Hide by default */
    font-family: var(--font-family);
}

.field-error:not(:empty) {
    display: block; /* Show only when there's content */
}

.error {
  border-color: var(--color-red) !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1) !important;
}

.disclaimer {
    margin: 1rem 0;
    text-align: center;
    color: var(--color-gray);
    font-size: 0.875rem;
    font-family: var(--font-family);
}

/* Responsive adjustments for auth forms */
@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .register-options {
        gap: 0.5rem;
    }
}

/* Add background only for login and register containers */
.login-container, .register-container {
    position: relative;
    z-index: 1;
}

.login-container::before,
.register-container::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('./bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

/* Add a semi-transparent overlay for better readability */
.login-container::after,
.register-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    z-index: -1;
}

/* ===== BOOLEAN FIELD STYLES ===== */
.entity-boolean-cell {
    font-weight: 500;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.25rem;
    min-width: 80px;
}

.entity-boolean-cell[style*="color: #28a745"] {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.entity-boolean-cell[style*="color: #dc3545"] {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ===== VIEW CONTAINER STYLES ===== */
.view-container {
  padding: 1.5rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.view-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.view-header h2 {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.view-header p {
  color: #64748b;
  font-size: 0.875rem;
}

.form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.form-section h3 {
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #ffffff;
  color: #1f2937;
  font-size: 0.875rem;
}

.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

/* Button styles - using base styles from styles_base.css */
/* .btn-secondary and .btn-outline are defined in styles_base.css */

.results-section {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.results-section.status-success {
    background-color: var(--color-green-disabled);
    color: var(--color-green);
    border-left-color: var(--color-green);
    border: 1px solid var(--color-green);
}

.results-section.status-error {
    background-color: var(--color-red-light-disabled);
    color: var(--color-red-light);
    border: 1px solid var(--color-red-light);
}