/* ========================================================
   manage-profile.css
   V3.2 - Experience Field Fixed (Full Width & Wide Input)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #1688d1;
  --color-primary-dark: #0c5fa8;
  
  --color-success: #2e7d32;
  --color-success-light: #4ade80; 
  --color-success-bg: #e8f5e9;
  
  --color-danger: #cc1f1f;
  --color-danger-bg: #ffecec;
  
  --color-text: #181c20;
  --color-text-secondary: #5a646e;
  --color-label: #0b2940; 
  --color-border: #dee2e6;
  
  --color-bg: #f9f9fb;
  --color-surface: #ffffff;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;
}

/* PAGE LAYOUT */
.manage-profile-main {
    background: var(--color-bg);
    min-height: 100vh;
    padding: 40px 20px;
    font-family: "Inter", sans-serif;
}

.container.add-profile-wrapper,
.add-profile-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
}

/* =========================================================================
   1. HEADER SECTION
   ========================================================================= */

.form-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.form-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.form-header p {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Create Mode Specifics */
.form-header.create-mode {
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    border-bottom: none;
    background: linear-gradient(to bottom, #f0f9ff, #fff);
    padding: 40px;
    border-radius: var(--radius-md);
    margin-bottom: 40px;
    position: relative;
}

/* LOGO PLACEHOLDER */
.logo-placeholder {
    width: 100%;
    height: 60px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* View Live Button */
.btn-view-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-view-live:hover {
    background: #f8f9fa;
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* =========================================================================
   2. FORM FIELDS
   ========================================================================= */

.add-profile-wrapper .acf-field {
  margin-bottom: 24px;
}

.add-profile-wrapper .acf-label {
  margin-bottom: 8px;
  display: block;
}

.add-profile-wrapper .acf-label label {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-label);
  display: block;
  margin-bottom: 0;
}

.add-profile-wrapper .acf-required {
  color: var(--color-danger);
  font-weight: 700;
  margin-left: 4px;
}

.add-profile-wrapper input[type="text"],
.add-profile-wrapper input[type="email"],
.add-profile-wrapper input[type="url"],
.add-profile-wrapper input[type="number"],
.add-profile-wrapper input[type="date"],
.add-profile-wrapper input[type="tel"],
.add-profile-wrapper textarea,
.add-profile-wrapper select {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 16px;
  color: var(--color-text);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.add-profile-wrapper input:focus,
.add-profile-wrapper textarea:focus,
.add-profile-wrapper select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22, 136, 209, 0.1);
  outline: none;
}

/* Force number inputs (like Experience) to fill width */
.add-profile-wrapper input[type="number"] {
    width: 100% !important;
    max-width: 100% !important;
}

/* =========================================================================
   3. CHECKBOXES & RADIO BUTTONS (Pill Style)
   ========================================================================= */

.add-profile-wrapper .acf-radio-list,
.add-profile-wrapper .acf-checkbox-list,
.add-profile-wrapper ul.acf-radio-list,
.add-profile-wrapper ul.acf-checkbox-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.add-profile-wrapper .acf-radio-list li,
.add-profile-wrapper .acf-checkbox-list li {
    margin: 0 !important;
    padding: 0 !important;
}

.add-profile-wrapper .acf-radio-list input,
.add-profile-wrapper .acf-checkbox-list input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.add-profile-wrapper .acf-radio-list label,
.add-profile-wrapper .acf-checkbox-list label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0;
  white-space: nowrap;
}

.add-profile-wrapper .acf-radio-list input:checked + label,
.add-profile-wrapper .acf-checkbox-list input:checked + label,
.add-profile-wrapper .acf-radio-list label.selected,
.add-profile-wrapper .acf-checkbox-list label.selected {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(22, 136, 209, 0.3);
  transform: translateY(-1px);
}

/* =========================================================================
   4. TOGGLE SWITCH (True/False Fields)
   ========================================================================= */

.add-profile-wrapper .acf-true-false,
.add-profile-wrapper .acf-field-true-false .acf-input {
  display: flex;
  align-items: center;
  gap: 12px;
}

.add-profile-wrapper .acf-true-false input[type="checkbox"] {
    display: none; 
}

.add-profile-wrapper .acf-true-false label {
  width: 52px;
  height: 30px;
  border-radius: 20px;
  background: #e0e0e0;
  border: none;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
  margin: 0;
  flex-shrink: 0;
}

.add-profile-wrapper .acf-true-false label::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.add-profile-wrapper .acf-true-false input:checked + label,
.add-profile-wrapper .acf-true-false label.selected {
    background: var(--color-success-light);
}

.add-profile-wrapper .acf-true-false input:checked + label::after,
.add-profile-wrapper .acf-true-false label.selected::after {
    transform: translateX(22px);
}

@supports (selector(:has(input:checked))) {
  .add-profile-wrapper .acf-true-false label:has(input:checked) {
    background: var(--color-success-light);
  }
  .add-profile-wrapper .acf-true-false label:has(input:checked)::after {
    transform: translateX(22px);
  }
}

/* =========================================================================
   5. SUBMIT BUTTONS
   ========================================================================= */

.fea-submit-button,
.fea-delete-button {
  width: 100%;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fea-submit-button {
  background: var(--color-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(22, 136, 209, 0.3);
}

.fea-submit-button:hover {
  background: var(--color-primary-dark) !important;
  transform: translateY(-1px);
}

.fea-delete-button {
  background: #ffffff !important; 
  color: var(--color-danger) !important;
  border: 1px solid var(--color-danger) !important;
  margin-top: 12px;
  font-size: 14px;
  min-height: 44px;
  box-shadow: none;
}

.fea-delete-button:hover {
  background: var(--color-danger-bg) !important;
  text-decoration: none;
  transform: translateY(-1px);
}

/* =========================================================================
   6. RESPONSIVE & LAYOUT (GRID)
   ========================================================================= */

@media (min-width: 768px) {
  .add-profile-wrapper .acf-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  
  /* --- FULL WIDTH FIELD SELECTORS --- */
  
  /* 1. Generic ACF classes */
  .add-profile-wrapper .acf-field[data-width="100"],
  .add-profile-wrapper .acf-field-textarea,
  .add-profile-wrapper .acf-field-wysiwyg,
  
  /* 2. Salary Fields - Force Wide */
  .add-profile-wrapper .acf-field[data-name="expected_salary_in_rupee"],
  .add-profile-wrapper .acf-field[data-name="expected_salary_in_us_dollars"],
  
  /* 3. About Field - Force Wide */
  .add-profile-wrapper .acf-field[data-name="about"],
  .add-profile-wrapper .acf-field[data-key="field_6915574e1848d"],

  /* 4. Experience Field - Force Wide (Added multiple selectors to catch it) */
  .add-profile-wrapper .acf-field-experience-in-years,
  .add-profile-wrapper .acf-field[data-name="experience_in_years"],
  .add-profile-wrapper .acf-field[data-key="field_690b077b91eed"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .container.add-profile-wrapper {
      padding: 24px;
      border-radius: 0;
      box-shadow: none;
  }
  .manage-profile-main {
      padding: 0;
      background: #fff;
  }
  .btn-view-live {
      width: 100%;
      justify-content: center;
  }
  .form-header.edit-mode {
      flex-direction: column;
      align-items: flex-start;
  }
}