@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: flex-start;
    margin-bottom: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    color: #555;
    line-height: 1.4;
}

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

/* Error styling for checkbox groups */
.checkbox-group.error label {
    color: #dc3545;
}

.checkbox-group.error input[type="checkbox"] {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

.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:not(:disabled) {
    background-color: rgba(209, 91, 70, 0.78);
}

.submit-button:active:not(:disabled) {
    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 {
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.confirmation-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
    border-radius: 12px;
    border: 2px solid #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
}

.confirmation-content h2 {
    color: #28a745;
    margin: 1rem 0;
    font-size: 1.5rem;
}

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

.confirmation-content i {
    color: #28a745;
}

.confirmation-message h2 {
    margin-bottom: 1rem;
    color: var(--color-black);
}

.confirmation-message p {
    color: #666;
    margin-bottom: 1.5rem;
}

.confirmation-success {
    color: var(--color-jasper);
}

.confirmation-error {
    color: #dc3545;
}

/* 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;
}

/* Links styling */
a {
    color: var(--color-jasper);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: rgba(209, 91, 70, 0.8);
}

/* 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;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem;
    }
    
    .contact-container {
        margin: 0.5rem;
    }
    
    .checkbox-group label {
        font-size: 0.9rem;
    }
}
