@import url("../css-template.css");

main {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    flex: 1;
}

.contact-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
  max-width: 600px;
}

.contact-container h2 {
    color: var(--color-black);
    font-size: 1.8rem;
}

.contact-container p {
    color: #666;
    margin-bottom: 1.5rem;
}

.form-group {
    width: 100%;
    position: relative;
    margin-bottom: 1.3rem;
}

.contact-input {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.contact-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(240, 173, 78, 0.2);
}

/* Error state styling for input fields */
.contact-input.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

.contact-input.error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
}

.contact-input::placeholder {
    color: #999;
    padding-left: 0;
}

textarea.contact-input {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #555;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--color-jasper);
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.submit-button {
    background-color: var(--color-jasper);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 1rem;
}

.submit-button:hover {
    background-color: rgba(209, 91, 70, 0.78);
}

.submit-button:active {
    background-color: rgba(209, 91, 70, 0.84);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button i {
    font-size: 1.2rem;
}

/* General error message styling (appears at top of form) */
.error-message {
    color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    padding: 15px 18px;
    margin-bottom: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1);
    animation: slideInDown 0.3s ease-out;
}

.error-message i {
    color: #dc3545;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Field-specific error messages */
.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    margin-bottom: 0;
    padding-left: 5px;
    display: flex;
    align-items: center;
    line-height: 1.3;
    animation: slideInUp 0.2s ease-out;
}

.field-error:before {
    content: '⚠';
    margin-right: 6px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Success confirmation styling */
.confirmation-message {
    display: none;
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #6c757d;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.15);
}

.confirmation-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
}

.confirmation-content h3 {
    color: #495057;
    margin: 1rem 0;
    font-size: 1.5rem;
}

.confirmation-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.confirmation-message.visible {
    display: block;
}

/* Loading state for submit button */
.bx-spin {
    animation: spin 1s linear infinite;
}

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

/* Animation keyframes */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Form group with error state */
.form-group.has-error .contact-input {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .error-message {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .field-error {
        font-size: 0.8rem;
    }
    
    .confirmation-content {
        padding: 1.5rem;
    }
}

/* Password requirements styling */
.password-requirements {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #6c757d;
}

.password-requirements small {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    width: 0%;
}

.password-strength-weak .password-strength-bar {
    background-color: #dc3545;
    width: 33%;
}

.password-strength-medium .password-strength-bar {
    background-color: #ffc107;
    width: 66%;
}

.password-strength-strong .password-strength-bar {
    background-color: #28a745;
    width: 100%;
}

@media (max-width: 480px) {
    main {
        padding: 1rem;
    }
    
    .contact-container {
        margin: 0.5rem;
    }
    
    .password-requirements {
        padding: 0.4rem;
        margin-top: 0.4rem;
    }
    
    .password-requirements small {
        font-size: 0.8rem;
    }
}
