/* DST Contact Form - Frontend Styles */

.dst-contact-form-wrapper {
    margin: 0 auto;
    padding-bottom: 50px;
}

.dst-cf-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Row dla pól obok siebie */
.dst-cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Form Fields */
.dst-cf-field {
    position: relative;
    width: 100%;
}

.dst-cf-field label {
   display: block;
  margin-bottom: 7px;
  margin-top: 10px;
  font-size: 14px;
  color: #000000;
  font-weight: 500;
  line-height: 1;
}

.dst-cf-field input,
.dst-cf-field select,
.dst-cf-field textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
  border: 1px solid #977EDB;
  border-radius: 6px;
  background: #A892DD0A;
  color: #000000;
  font-family: inherit;
  transition: border-color 0.2s ease;
  outline: none;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 2px 2px 0px rgba(111, 70, 223, 0.06);
}

.dst-cf-field input:focus,
.dst-cf-field select:focus,
.dst-cf-field textarea:focus {
    border-color: #999 !important;
    outline: none !important;
    box-shadow: none !important;
}

.dst-cf-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* AI Generate Button */
.dst-cf-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    margin-top: 10px;
}

.dst-cf-ai-generate {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #6f46df;
    border: 1px solid #6f46df;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dst-cf-ai-generate.visible {
    display: inline-flex;
}

.dst-cf-ai-generate:hover {
    background: #fe6e2c;
    border-color: #fe6e2c;
    color: #000;
}

.dst-cf-ai-generate .dst-cf-ai-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.dst-cf-ai-generate.generating .dst-cf-ai-icon {
    animation: sparkle 0.8s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
}

.dst-cf-message-field label {
    margin-top: 0;
    margin-bottom: 0;
}

/* Select styling */
.dst-cf-select-wrapper select {
    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='%23000000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    font-weight: 600;
}

/* Checkboxy */
.dst-cf-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.dst-cf-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.6;
    font-size: 14px;
    color: #000000;
}

.dst-cf-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0 0;
    cursor: pointer;
    accent-color: #333;
}

.dst-cf-checkbox-label a {
    color: #000000;
    text-decoration: underline;
}

.dst-cf-checkbox-label a:hover {
    color: #666;
}

.dst-cf-checkbox-label span {
    flex: 1;
}

/* Submit Button */
.dst-cf-submit-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 10px;
    align-items: center;
}

.dst-cf-submit {
    position: relative;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    background: #6F46DF;
    border: none;
    border-radius: 66px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.dst-cf-submit:hover {
    background: #5a38b8;
}

.dst-cf-submit:active {
    transform: translateY(0) scale(0.98);
}

.dst-cf-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.dst-cf-submit-text {
    display: inline-block;
    transition: opacity 0.3s;
}

/* Gdy loading, pokazuj tekst normalnie (bez ukrywania) */
.dst-cf-submit.loading .dst-cf-submit-text {
    opacity: 1;
}

/* Loader Animation - ukryty domyślnie, nie używany */
.dst-cf-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    display: none;
}

.dst-cf-submit.loading .dst-cf-loader {
    display: none; /* Nie pokazuj loadera, używamy tylko tekstu */
}

/* Response time info */
.dst-cf-response-time {
    margin-top: 0;
    font-size: 13px;
    color: #089504;
    text-align: center;
    font-style: normal;
    padding: 0 1rem;
    line-height: 1;
    font-weight: bold;
}

.dst-cf-loader svg {
    width: 100%;
    height: 100%;
    animation: dst-spin 1s linear infinite;
}

.dst-cf-loader circle {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: dst-dash 1.5s ease-in-out infinite;
}

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

@keyframes dst-dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Message Box */
.dst-cf-message-box {
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
    margin-top: 20px;
}

.dst-cf-message-box.success {
    display: block;
    background: #10B981;
    color: #FFFFFF;
}

.dst-cf-message-box.error {
    display: block;
    background: #EF4444;
    color: #FFFFFF;
}

/* Responsywność */
@media (max-width: 768px) {

    
    .dst-cf-form {
        gap: 20px;
    }
    
    .dst-cf-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .dst-cf-field input,
    .dst-cf-field select,
    .dst-cf-field textarea {
        font-size: 16px; /* Zapobiega zoomowaniu na iOS */
    }
    
    .dst-cf-submit {
        width: 100%;
        padding: 14px 32px;
        font-size: 16px;
    }



.dst-cf-submit-wrapper {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.dst-cf-response-time {
  text-align: left;
}

  .dst-cf-form {
    gap: 0px;
  }


}

/* Walidacja - błędne pole */
.dst-cf-field input:invalid:focus,
.dst-cf-field select:invalid:focus,
.dst-cf-field textarea:invalid:focus {
    border-color: #EF4444;
}
