/* Calligraphy Practice Generator Styles */

.calligraphy-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.controls-panel {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.control-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.control-section:last-of-type {
  border-bottom: none;
  margin-bottom: 12px;
}

.control-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 10px;
}

/* Type Select */
.type-select select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--gray-700);
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.type-select select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Control Groups */
.control-group {
  margin-bottom: 10px;
}

.control-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 5px;
}

.control-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--gray-700);
  background: #fff;
  cursor: pointer;
}

.control-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.control-group input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.control-group input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
}

.control-group input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
  margin-top: 4px;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Color Controls */
.color-row-3 {
  display: flex;
  gap: 8px;
}

.color-row-3 .control-group {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-input-wrap input[type="color"] {
  width: 36px;
  height: 36px;
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
}

.color-input-wrap input[type="color"]:hover {
  border-color: var(--primary);
}

.color-input-wrap span {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-family: monospace;
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-buttons .btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9rem;
}

/* Preview Panel */
.preview-panel {
  position: relative;
}

.preview-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.preview-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.preview-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.preview-header p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.preview-box {
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

/* Calligraphy Sheet - A4 Paper */
.resprint {
  width: 250mm;
  background: #fff;
  box-sizing: border-box;
}

.resprinthead {
  border-bottom: 1px solid #bbbbbb;
  padding-bottom: 8px;
}

.resprinthead-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.resprinthead-info div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.resprinthead-info span {
  font-size: 14px;
  color: #666666;
}

.info-site {
  color: #999;
  font-size: 12px;
}

/* Result Content Styles */
.reszhuti {
  display: flex;
  justify-content: center;
}

/* Info Content */
.info-content {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.8;
}

.info-content p {
  margin-bottom: 10px;
}

.info-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.info-content li {
  margin-bottom: 5px;
}

/* Print Styles */
@media print {
  body {
    background: #fff !important;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  header,
  .calligraphy-layout .controls-panel,
  .info-section,
  .links-section,
  footer,
  .preview-header {
    display: none !important;
  }

  .calligraphy-layout {
    display: block;
  }

  .preview-card {
    box-shadow: none;
    padding: 0;
  }

  .preview-box {
    border: none;
    padding: 0;
    max-height: none;
    overflow: visible;
  }

  .resprint {
    box-shadow: none;
    width: 100%;
    min-height: auto;
    padding: 2mm 5mm 2mm 5mm;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .resprint {
    width: 100%;
    min-height: auto;
  }
}

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

  .resprinthead-info {
    flex-direction: column;
    gap: 4px;
  }

  .resprinthead-info div {
    flex-direction: column;
    gap: 4px;
  }
}
