/* Professional Form Styling */

/* Form Container */
.professional-form {
    padding: 2.5rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    height: 100%;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Add subtle grid pattern background */
.professional-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.4;
    z-index: -1;
}

/* Form Title */
.form-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--background-color);
    text-align: center;
}

.form-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.5;
}

/* Form Groups */
.pro-form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.pro-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

/* Field focus state */
.field-focused {
    position: relative;
}

.field-focused::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 35px;
    width: 3px;
    height: 24px;
    background-color: var(--accent-color);
    border-radius: 3px;
    animation: fadeIn 0.3s ease-in-out;
}

.pro-form-group input,
.pro-form-group select,
.pro-form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.07);
    color: var(--background-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pro-form-group input:focus,
.pro-form-group select:focus,
.pro-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pro-form-group input::placeholder,
.pro-form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-size: 0.9rem;
}

.pro-form-group select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" fill="white" viewBox="0 0 12 6"><path d="M0 0l6 6 6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Add subtle glow effect on focus */
.pro-form-group input:focus,
.pro-form-group select:focus,
.pro-form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.15), 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Enhanced field styles */
.pro-form-group.half-width {
    width: calc(50% - 0.75rem);
    display: inline-block;
    vertical-align: top;
}

.pro-form-group.half-width:first-of-type {
    margin-right: 1.5rem;
}

/* Input group with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 2.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

/* Required Field Indicator */
.required-field::after {
    content: "*";
    color: var(--accent-color);
    margin-left: 3px;
}

/* Form Field Icons */
.field-icon {
    position: absolute;
    right: 12px;
    top: 38px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

/* Checkbox Styling */
.pro-form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pro-form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.25rem;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.pro-checkbox-label {
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
}

/* Form Submit Button */
.pro-form-submit {
    margin-top: 2.5rem;
}

.pro-submit-btn {
    width: 100%;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.95rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.3);
    text-transform: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pro-submit-btn:hover {
    background-color: #ca6b1e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-color-rgb), 0.4);
}

.pro-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(var(--accent-color-rgb), 0.3);
}

.pro-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease-in-out;
}

.pro-submit-btn:hover::after {
    transform: translateX(100%);
}

.pro-submit-btn .btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.pro-submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Subtle pulsing glow effect on the submit button */
.pro-submit-btn {
    animation: subtle-pulse 2s infinite ease-in-out;
}

@keyframes subtle-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.3);
    }
}

/* Form Footer */
.pro-form-footer {
    margin-top: 1.8rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.pro-privacy-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.pro-privacy-note a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.pro-privacy-note a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Success Message */
.form-success {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    height: 100%;
    animation: fadeIn 0.5s ease-in-out;
}

.form-success h3 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    animation: slideUp 0.6s ease-in-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.form-success p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    animation: slideUp 0.6s ease-in-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
    transform: translateY(20px);
}

.success-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: rgba(var(--accent-color-rgb), 0.1);
    border: 2px solid rgba(var(--accent-color-rgb), 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.5);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes checkmarkDraw {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* SVG animations for success */
.success-circle {
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
    animation: circleDraw 1s ease-in-out forwards;
    animation-delay: 0.2s;
}

.success-checkmark {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmarkDraw 1s ease-in-out forwards;
    animation-delay: 0.8s;
}

@keyframes circleDraw {
    0% {
        stroke-dashoffset: 180;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Return button */
.return-btn {
    background-color: transparent;
    color: var(--background-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    animation: slideUp 0.6s ease-in-out forwards;
    animation-delay: 0.7s;
    opacity: 0;
    transform: translateY(20px);
}

.return-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.return-btn:active {
    transform: translateY(0);
}

/* Character Counter */
.char-counter {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.char-counter-warning {
    color: #ffd166;
}

.char-counter-error {
    color: #ff6b6b;
}

/* Focus state highlight */
.pro-form-group textarea:focus + .char-counter {
    color: rgba(255, 255, 255, 0.8);
}

/* Form validation styling */
.pro-form-group input:focus:invalid,
.pro-form-group select:focus:invalid,
.pro-form-group textarea:focus:invalid {
    border-color: rgba(255, 100, 100, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 100, 100, 0.15);
}

.pro-form-group input:valid:not(:placeholder-shown),
.pro-form-group select:valid:not(:placeholder-shown),
.pro-form-group textarea:valid:not(:placeholder-shown) {
    border-color: rgba(100, 255, 100, 0.5);
}

/* Custom validation error styles */
.error-message {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.warning-message {
    color: #ffd166;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.input-error {
    border-color: #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.05) !important;
}

.input-warning {
    border-color: #ffd166 !important;
}

.form-submission-error {
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Field specific styling */
.pro-form-group.half-width {
    width: calc(50% - 0.5rem);
    display: inline-block;
}

.pro-form-group.half-width:nth-child(odd) {
    margin-right: 1rem;
}

/* Loading indicator for submit button */
.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.pro-submit-btn.loading .btn-text,
.pro-submit-btn.loading .btn-icon {
    visibility: hidden;
}

.pro-submit-btn.loading .loading-spinner {
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Submit success animation */
@keyframes checkmark {
    0% { 
        transform: scale(0); 
        opacity: 0;
    }
    50% { 
        transform: scale(1.2); 
        opacity: 1;
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
    }
}

/* Media queries */
@media (max-width: 992px) {
    .professional-form {
        border-radius: 0 0 12px 12px;
    }
}

@media (max-width: 768px) {
    .pro-form-group.half-width {
        width: 100%;
        display: block;
        margin-right: 0;
    }
}