/*
Theme Name: Application System
Theme URI: https://example.com/application-system
Description: A custom WordPress theme for managing application submissions with form builder, email templates, and admin panel.
Version: 1.0.0
Author: Your Company
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: application-system
*/

* {
  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-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.application-form-wrapper {
  max-width: 800px;
  margin: 40px auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.form-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

.form-header h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.form-header p {
  font-size: 16px;
  opacity: 0.9;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  padding: 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 10px;
}

.progress-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-weight: bold;
  transition: all 0.3s;
}

.progress-step.active .progress-step-number {
  background: #667eea;
  color: white;
}

.progress-step.completed .progress-step-number {
  background: #28a745;
  color: white;
}

.progress-step-label {
  font-size: 12px;
  color: #6c757d;
}

.progress-step.active .progress-step-label {
  color: #667eea;
  font-weight: 600;
}

.form-content {
  padding: 40px 30px;
}

.form-group {
  margin-bottom: 24px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: all 0.3s;
  flex: 1;
}

.radio-option:hover {
  border-color: #667eea;
  background-color: #f8f9ff;
}

.radio-option input[type="radio"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
  font-weight: 600;
  color: #667eea;
}

.radio-option:has(input[type="radio"]:checked) {
  border-color: #667eea;
  background-color: #f8f9ff;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.template-card {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  background: white;
}

.template-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.template-card.selected {
  border-color: #667eea;
  background: #f0f3ff;
}

.template-preview {
  width: 100%;
  height: 160px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.template-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.template-preview .template-icon {
  font-size: 48px;
  color: #adb5bd;
}

.template-info {
  padding: 16px;
}

.template-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.template-info p {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 12px;
  line-height: 1.4;
}

.template-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.template-link:hover {
  background: #5568d3;
  transform: translateY(-1px);
}

.template-link .external-icon {
  font-size: 14px;
  line-height: 1;
}

.color-picker-container {
  max-width: 500px;
  margin: 0 auto;
}

.color-picker-wrapper {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.color-input-group {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
}

#color_picker {
  width: 80px;
  height: 50px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.3s;
}

#color_picker:hover {
  border-color: #667eea;
}

#color_code {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  text-align: center;
  background: white;
  color: #333;
}

.color-preview {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-preview .preview-label {
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.color-sample-preview {
  margin-top: 40px;
  padding: 30px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.sample-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}

.sample-description {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 24px;
  line-height: 1.6;
}

.sample-content-area {
  padding: 32px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.sample-heading-large {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 24px;
  color: #667eea;
  transition: all 0.3s ease;
  padding-left: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-right: 20px;
  border-left: 6px solid #667eea;
  background: linear-gradient(to right, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12);
  position: relative;
}

.sample-heading-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, #667eea 0%, rgba(102, 126, 234, 0.6) 100%);
  transition: all 0.3s ease;
}

.sample-heading-large:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.sample-heading-medium {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
  color: #667eea;
  transition: all 0.3s ease;
  padding-left: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(to right, #667eea 0%, rgba(102, 126, 234, 0.3) 100%);
  border-image-slice: 1;
  position: relative;
}

.sample-heading-medium::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.sample-heading-medium:hover::before {
  transform: translateY(-50%) scale(1.2);
  box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.2);
}

.sample-heading-small {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 16px;
  color: #667eea;
  transition: all 0.3s ease;
  padding-left: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-left: 3px solid #667eea;
  background: rgba(102, 126, 234, 0.04);
  border-radius: 0 4px 4px 0;
  position: relative;
}

.sample-heading-small::after {
  content: '';
  position: absolute;
  top: 0;
  left: -3px;
  width: 3px;
  height: 30%;
  background: #667eea;
  border-radius: 3px;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.sample-heading-small:hover {
  background: rgba(102, 126, 234, 0.08);
  padding-left: 20px;
}

.sample-heading-small:hover::after {
  height: 100%;
  opacity: 1;
}

.sample-paragraph {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
}

.sample-list {
  margin: 24px 0;
  padding-left: 24px;
  list-style: none;
}

.sample-list-item {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 12px;
  position: relative;
  padding-left: 12px;
}

.sample-list-item::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 12px;
  width: 6px;
  height: 6px;
  background-color: #667eea;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.sample-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sample-link:hover {
  border-bottom-color: #667eea;
}

.file-upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.file-upload-area:hover {
  border-color: #667eea;
  background: #f0f3ff;
}

.file-upload-area.drag-over {
  border-color: #667eea;
  background: #f0f3ff;
}

.uploaded-files {
  margin-top: 20px;
}

.uploaded-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 10px;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  padding: 30px;
  border-top: 1px solid #e9ecef;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
}

.success-message {
  color: #28a745;
  padding: 12px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  margin-bottom: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  .template-grid {
    grid-template-columns: 1fr;
  }

  .progress-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .progress-step {
    flex-basis: calc(50% - 5px);
  }

  .form-content {
    padding: 30px 20px;
  }

  .form-navigation {
    padding: 20px;
  }

  .sample-content-area {
    padding: 24px 16px;
  }

  .sample-heading-large {
    font-size: 26px;
    padding-left: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-left-width: 4px;
  }

  .sample-heading-medium {
    font-size: 20px;
    padding-left: 16px;
    padding-bottom: 10px;
  }

  .sample-heading-medium::before {
    width: 6px;
    height: 6px;
  }

  .sample-heading-small {
    font-size: 16px;
    padding-left: 12px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .color-sample-preview {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .progress-step-label {
    font-size: 10px;
  }

  .template-info h3 {
    font-size: 14px;
  }

  .template-info p {
    font-size: 12px;
  }

  .sample-heading-large {
    font-size: 22px;
    padding-left: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-left-width: 3px;
  }

  .sample-heading-large::before {
    width: 3px;
  }

  .sample-heading-medium {
    font-size: 18px;
    padding-left: 14px;
    padding-bottom: 8px;
    border-bottom-width: 2px;
  }

  .sample-heading-medium::before {
    width: 5px;
    height: 5px;
  }

  .sample-heading-small {
    font-size: 15px;
    padding-left: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    border-left-width: 2px;
  }

  .sample-heading-small::after {
    width: 2px;
  }

  .sample-paragraph,
  .sample-list-item {
    font-size: 14px;
  }
}
