/* contact.css */

/* #pragma region Contact Hero */
.contact-hero {
  text-align: center;
  margin-bottom: 40px;
}

.contact-hero h1 { 
  margin: 0 0 12px; 
  font-size: 2.5rem;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.contact-hero .muted { 
  color: var(--muted); 
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  line-height: 1.5;
}
/* #pragma endregion */

/* #pragma region Contact Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}

.contact-card { 
  padding: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), transparent);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border-radius: var(--card-radius);
  border: 1px solid var(--card-border);
}

.contact-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.contact-card .card-header h3 {
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.005em;
}

.telegram-badge {
  background: linear-gradient(135deg, #3BA55D, #4CAF50);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}

.card-subtitle {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}
/* #pragma endregion */

/* #pragma region Form Elements */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}

.label-text {
  flex: 1;
}

.required {
  color: var(--danger);
  font-size: 12px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-size: 11px;
  font-weight: normal;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-weight: 400;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}

.form-input.valid {
  border-color: var(--success);
  background: rgba(59, 165, 93, 0.05);
}

.form-input.invalid,
.form-select.invalid,
.form-textarea.invalid {
  border-color: var(--danger);
  background: rgba(224, 92, 92, 0.05);
  animation: shake 0.3s ease-in-out;
}
/* #pragma endregion */

/* #pragma region Select Styles */
.form-select {
  appearance: none;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234DA3FF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 16px center / 16px;
  cursor: pointer;
  color: var(--text);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--panel);
  border: 2px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  width: 100%;
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-select::-ms-expand {
  display: none;
}

@-moz-document url-prefix() {
  .form-select {
    text-indent: 0;
    text-overflow: '';
    padding-right: 44px;
  }
  
  .form-select option {
    background-color: var(--panel);
    color: var(--text);
  }
}

.form-select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}

.form-select:valid {
  color: var(--text);
}

.form-select option {
  background: var(--panel);
  color: var(--text);
  padding: 12px;
  border: none;
  font-size: 14px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.form-select option:hover {
  background: var(--accent);
  color: white;
}

.form-select option:checked {
  background: var(--accent);
  color: white;
}

.form-select option:checked:focus {
  background: var(--accent) !important;
  color: white !important;
}

@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
    .form-select {
      -webkit-appearance: none;
      appearance: none;
    }
  }
}
/* #pragma endregion */

/* #pragma region Textarea Styles */
.form-textarea {
  resize: none;
  min-height: 120px;
  line-height: 1.5;
  overflow: hidden;
  display: block;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.char-counter {
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.char-counter.normal {
  color: var(--muted);
}

.char-counter.warning {
  color: #ffa726;
  text-shadow: 0 0 10px rgba(255, 167, 38, 0.3);
}

.char-counter.danger {
  background: linear-gradient(45deg, #ff4444, #ff0000, #cc0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  text-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
  animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.min-chars {
  font-size: 11px;
  color: var(--muted);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}

.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}
/* #pragma endregion */

/* #pragma region Button Styles */
.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 24px 0;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #3d93ff);
  color: white;
  border: 2px solid transparent;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(77, 163, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 2px solid var(--card-border);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--accent);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn.loading .btn-loader {
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* #pragma endregion */

/* #pragma region Delivery Info */
.delivery-info {
  text-align: center;
  margin-top: 16px;
}

.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(59, 165, 93, 0.1);
  border: 1px solid rgba(59, 165, 93, 0.3);
  border-radius: 20px;
  color: #3BA55D;
  font-size: 12px;
  font-weight: 500;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}
/* #pragma endregion */

/* #pragma region Contact Links */
.contact-links { 
  padding: 25px;
  position: sticky;
  top: 20px;
  background: var(--panel);
  border-radius: var(--card-radius);
  border: 1px solid var(--card-border);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.contact-links h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: var(--accent);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.links-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.link-item {
  margin-bottom: 8px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  min-height: 48px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.contact-link:hover {
  background: rgba(77, 163, 255, 0.1);
  border-color: rgba(77, 163, 255, 0.3);
  transform: translateX(5px);
}

.link-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.link-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.link-title {
  font-weight: 600;
  font-size: 14px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}

.link-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}

.link-arrow {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
}

.link-badge {
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.telegram-demo {
  background: rgba(77, 163, 255, 0.05);
  border-color: rgba(77, 163, 255, 0.2);
}
/* #pragma endregion */

/* #pragma region Contact Info */
.contact-info {
  margin-bottom: 24px;
}

.info-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.info-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.info-content {
  flex: 1;
}

.info-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}

.info-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}
/* #pragma endregion */

/* #pragma region Support Note */
.support-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(77, 163, 255, 0.05);
  border: 1px solid rgba(77, 163, 255, 0.2);
  border-radius: 10px;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.support-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.support-text {
  font-size: 13px;
  line-height: 1.4;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

.support-text strong {
  font-weight: 600;
}
/* #pragma endregion */

/* #pragma region Error Messages */
.error-message {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: block;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
}
/* #pragma endregion */

/* #pragma region Status Messages */
.status-message {
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 14px;
  display: none;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  line-height: 1.4;
}

.status-message.success {
  background: rgba(59, 165, 93, 0.1);
  border: 1px solid rgba(59, 165, 93, 0.3);
  color: #3BA55D;
  display: block;
}

.status-message.error {
  background: rgba(224, 92, 92, 0.1);
  border: 1px solid rgba(224, 92, 92, 0.3);
  color: var(--danger);
  display: block;
}

.status-message.info {
  background: rgba(77, 163, 255, 0.1);
  border: 1px solid rgba(77, 163, 255, 0.3);
  color: var(--accent);
  display: block;
}
/* #pragma endregion */

/* #pragma region Animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
/* #pragma endregion */

@-moz-document url-prefix() {
  .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234DA3FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 44px;
  }
  
  .form-select option {
    background-color: var(--panel) !important;
    color: var(--text) !important;
  }
  
  .form-select:focus option {
    background-color: var(--accent) !important;
    color: white !important;
  }
}

/* #pragma region Contact Responsive */
@media (max-width: 1000px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-links {
    position: static;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    margin-bottom: 30px;
  }
  
  .contact-hero h1 {
    font-size: 2rem;
  }
  
  .contact-hero .muted {
    font-size: 1rem;
  }
  
  .contact-grid {
    gap: 16px;
  }
  
  .contact-card, .contact-links {
    padding: 20px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .telegram-badge {
    align-self: center;
    margin: 0 auto;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 16px;
    font-size: 16px;
    min-height: 48px;
  }
  
  .form-textarea {
    min-height: 120px;
  }
  
  .form-actions {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    min-height: 52px;
    margin: 0;
  }
  
  .contact-link {
    padding: 16px;
    min-height: 48px;
  }
  
  .link-content {
    font-size: 15px;
  }
  
  .info-item {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .contact-hero h1 {
    font-size: 1.8rem;
  }
  
  .contact-card, .contact-links {
    padding: 16px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 14px;
  }
  
  .form-actions {
    gap: 10px;
    margin: 16px 0;
    padding: 0;
    width: 100%;
  }
  
  .btn {
    padding: 15px;
    min-height: 50px;
    font-size: 15px;
    width: 100%;
    margin: 0;
  }
  
  .card-header {
    align-items: center;
    text-align: center;
  }
  
  .telegram-badge {
    align-self: center;
    margin: 0 auto;
    justify-content: center;
  }
  
  .link-item {
    margin-bottom: 6px;
  }
  
  .contact-link {
    padding: 14px;
  }
  
  .info-item {
    padding: 12px;
  }
}

@media (max-width: 451px) {
  .contact-card, .contact-links {
    padding: 12px;
    margin: 0;
    width: 100%;
  }
  
  .contact-grid {
    gap: 12px;
    margin: 0;
    width: 100%;
  }
  
  .form-actions {
    gap: 8px;
    margin: 14px 0 0 0;
    padding: 0;
    width: 100%;
  }
  
  .btn {
    padding: 14px 12px;
    min-height: 48px;
    font-size: 14px;
    width: 100%;
    margin: 0;
    border-radius: 8px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
  
  .telegram-badge {
    align-self: center;
    margin: 0 auto;
    justify-content: center;
    width: fit-content;
  }
  
  .contact-form {
    margin: 0;
    padding: 0;
    width: 100%;
  }
  
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 12px;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .contact-hero h1 {
    font-size: 1.6rem;
  }
  
  .contact-card, .contact-links {
    padding: 10px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .form-actions {
    gap: 6px;
    margin: 12px 0 0 0;
  }
  
  .btn {
    padding: 12px 10px;
    min-height: 44px;
    font-size: 13px;
  }
  
  .telegram-badge {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .contact-link {
    padding: 10px;
    min-height: 44px;
  }
  
  .btn-icon {
    font-size: 14px;
  }
}
/* #pragma endregion */

/* #pragma region Contact Form Fixes */
#contact-page .container {
  box-sizing: border-box;
}

.contact-form {
  box-sizing: border-box;
}

.form-actions {
  box-sizing: border-box;
}

.form-actions .btn {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}

.contact-form {
  width: 100%;
  margin: 0;
  padding: 0;
}

.form-group:last-of-type {
  margin-bottom: 0;
}
/* #pragma endregion */
