/* ==========================================================================
    Feedback Form Styles
    ========================================================================== */

.generic-form {
    --primary-color: #2a81d7;
    --error-color: #e74c3c;
    --border-radius: 8px;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-label-color: #1a202c;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

    max-width: 800px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.generic-form a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}
.generic-form a:hover {
    color: darken(var(--primary-color), 10%);
}

/* --- Form Header & Info --- */
.generic-form .form-header {
    font-size: 25px;
    font-weight: 600;
    line-height: 2.5em;
    margin-bottom: 20px;
    text-align: left;
    /* color: var(--primary-color, #0066cc); */
}

.generic-form .form-info-card {
    margin-bottom: 30px;
}

.generic-form .form-info-card .content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.generic-form .form-info-card .text p {
    margin: 0;
    line-height: 1.5;
    color: #333;
}

.generic-form .form-info-card .text p.small {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
}

/* --- Form Layout --- */
.generic-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.generic-form .form-full-width {
    margin-bottom: 20px;
}

.generic-form .form-full-width.less-margin {
    margin-bottom: 15px;
}

/* --- Form Elements --- */
.generic-form .form-group {
    position: relative;
}

.generic-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--input-label-color);
    font-size: 12px;
}

.generic-form .required-marker {
    color: var(--error-color);
    margin-right: 2px;
}

.generic-form input[type="text"],
.generic-form input[type="password"],
.generic-form input[type="number"],
.generic-form input[type="date"],
.generic-form input[type="search"],
.generic-form input[type="url"],
.generic-form input[type="email"],
.generic-form input[type="tel"],
.generic-form select,
.generic-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    background-color: var(--input-bg);
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.generic-form input.bigger, select.bigger, textarea.bigger {
    padding: 14px 18px;
    font-size: 16px;
}

.generic-form textarea {
    min-height: 100px;
    resize: vertical;
}

.generic-form select {
    color: #333333;
    appearance: none;
    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='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.generic-form input:focus,
.generic-form select:focus,
.generic-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.generic-form .textarea-char-counter {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* --- Custom Checkboxes --- */
.generic-form .checkbox-block {
    display: flex;
    align-items: flex-start;
}

.generic-form .checkbox-block input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.generic-form .checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.generic-form .checkbox-visual {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: -1px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--input-border);
    border-radius: 6px;
    background-color: var(--input-bg);
    transition: all 0.2s ease;
}

.generic-form .checkbox-visual::after {
    content: '';
    position: absolute;
    display: none;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    top: 2px;
}

.generic-form .checkbox-block input[type="checkbox"]:checked + .checkbox-label .checkbox-visual {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.generic-form .checkbox-block input[type="checkbox"]:checked + .checkbox-label .checkbox-visual::after {
    display: block;
}

.generic-form .checkbox-block input[type="checkbox"]:focus + .checkbox-label .checkbox-visual {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.generic-form .checkbox-content {
    font-size: 15px;
    line-height: 1.5;
    flex: 1;
}

/* --- Custom Radio Buttons --- */
.generic-form .radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.generic-form .radio-block {
    position: relative;
}

.generic-form .radio-block input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.generic-form .radio-block-label {
    display: flex !important;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin: 0 !important;
}

.generic-form .radio-block-label:hover {
    background-color: rgba(0, 102, 204, 0.02);
    transform: translateY(-1px);
}

.generic-form .radio-block input[type="radio"]:checked+.radio-block-label {
    background-color: rgba(0, 102, 204, 0.05);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.generic-form .radio-block input[type="radio"]:focus+.radio-block-label {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.generic-form .radio-visual {
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e0;
    background-color: white;
    margin-right: 14px;
    margin-top: 2px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.generic-form .radio-block input[type="radio"]:checked+.radio-block-label .radio-visual {
    border-color: var(--primary-color);
}

.generic-form .radio-visual:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    transition: transform 0.2s ease;
}

.generic-form .radio-block input[type="radio"]:checked+.radio-block-label .radio-visual:after {
    transform: translate(-50%, -50%) scale(1);
}

.generic-form .radio-content {
    display: flex;
    flex-direction: column;
}

.generic-form .radio-title {
    font-weight: 500;
    font-size: 15px;
    color: #1a202c;
    margin-bottom: 4px;
}

.generic-form .radio-description {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

/* --- Section Header --- */
.generic-form .form-section-header {
    margin: 32px 0 20px;
    padding-bottom: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.generic-form .form-section-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.generic-form .form-section-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.3;
}

.generic-form .form-section-description {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
    margin-bottom: 0px;
    line-height: 1.5;
}

/* --- File Uploader --- */
.generic-form .file-upload-section {
    border: 1px dashed var(--input-border);
    padding: 20px;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
}

.generic-form .file-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 0 0 15px 0;
    padding: 0;
    list-style: none;
}

.generic-form .file-item {
    border-radius: var(--border-radius);
    background: white;
    border: 1px solid var(--input-border);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
}

.generic-form .file-preview {
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
}

.generic-form .file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.generic-form .file-info {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.generic-form .file-name {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}

.generic-form .upload-button {
    background-color: #3385d6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.generic-form .upload-button:hover {
    background-color: #0056b3;
}

.generic-form .upload-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
}

.generic-form .remove-file-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
}

/* --- Form Actions --- */
.generic-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.generic-form .btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.generic-form .btn.bigger {
    padding: 12px 28px;
    font-size: 16px;
}

.generic-form .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.generic-form .btn-primary:hover {
    background-color: #0056b3;
}

.generic-form .btn-secondary {
    background-color: #e9ecef;
    color: #495057;
}

.generic-form .btn-secondary:hover {
    background-color: #dee2e6;
}

/* ==========================================================================
    Responsive Styles
    ========================================================================== */
@media (max-width: 767px) {
    .generic-form .form-header {
        font-size: 20px;
        line-height: 2em;
    }

    .generic-form .radio-block-label {
        padding: 12px;
    }

    .generic-form .form-section-header {
        margin: 28px 0 16px;
    }

    .generic-form .form-section-header h3 {
        font-size: 18px;
    }

    .generic-form .form-section-description {
        font-size: 13px;
    }

    .generic-form .form-grid {
        grid-template-columns: 1fr;
    }
}


/* Success Form Styles */
.generic-form .success-container {
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    animation: container-appear 0.6s ease-out forwards;
}

.generic-form .success-container .success-animation {
    margin-bottom: 2rem;
    height: 120px;
    position: relative;
}

.generic-form .success-container .success-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
}

.generic-form .success-container .success-circle {
    stroke: #16c79a;
    stroke-width: 1.5;
    fill: none;
    animation: circle-draw 1s ease-in-out 0.2s forwards;
    opacity: 0;
}

.generic-form .success-container .success-check {
    stroke: #16c79a;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: check-draw 0.6s ease-in-out 0.8s forwards;
}

.generic-form .success-container .success-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a2e44;
    animation: text-appear 0.6s ease-out 0.3s both;
}

.generic-form .success-container .success-message {
    font-size: 1rem;
    color: #16c79a;
    margin-bottom: 0.5rem;
    font-weight: 600;
    animation: text-appear 0.6s ease-out 0.4s both;
}

.generic-form .success-container .success-details {
    font-size: 0.9rem;
    color: #4c5b6b;
    margin-bottom: 2rem;
    animation: text-appear 0.6s ease-out 0.5s both;
}

.generic-form .success-container .success-actions {
    animation: text-appear 0.6s ease-out 0.6s both;
}

.generic-form .success-container .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3e90e0 0%, #2a81d7 100%); /* Changed gradient to blue */
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(42, 129, 215, 0.3); /* Changed to blue shadow */
    transition: all 0.3s ease;
}

.generic-form .success-container .primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(42, 129, 215, 0.4);
}

.generic-form .success-container .button-icon {
    margin-right: 8px;
    font-size: 1rem;
}

@keyframes container-appear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes text-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes circle-draw {
    from {
        opacity: 1;
        stroke-dasharray: 0 100;
    }
    to {
        opacity: 1;
        stroke-dasharray: 100 100;
    }
}

@keyframes check-draw {
    from {
        stroke-dashoffset: 20;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 767px) {
    .generic-form .success-container {
        padding: 2.5rem 1.5rem;
    }
    
    .generic-form .success-container .success-title {
        font-size: 1.4rem;
    }
    
    .generic-form .success-container .success-message {
        font-size: 1rem;
    }
    
    .generic-form .success-container .success-details {
        font-size: 0.85rem;
    }
    
    .generic-form .success-container .success-icon {
        width: 80px;
        height: 80px;
    }
    
    .generic-form .success-container .success-animation {
        height: 80px;
    }
}
