/* ===================================
   Isola Complaints Form - Styles
   =================================== */

:root {
    --primary-color: #7CB342;
    --primary-dark: #558B2F;
    --accent-color: #FFA726;
    --urgent-color: #F44336;
    --medium-color: #FFC107;
    --normal-color: #4CAF50;
    --bg-color: #F5F5F5;
    --card-bg: #FFFFFF;
    --text-dark: #212121;
    --text-light: #757575;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================
   Header
   =================================== */

.header {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    box-shadow: var(--shadow);
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    animation: zoomIn 0.6s ease-out;
}

.header h1 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 10px;
}

.header p {
    color: var(--text-light);
    font-size: 16px;
}

/* ===================================
   Form
   =================================== */

.complaint-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #F0F0F0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
}

.required {
    color: var(--urgent-color);
}

input[type="text"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

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

.char-count {
    display: block;
    text-align: left;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 5px;
}

/* ===================================
   Autocomplete
   =================================== */

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #F0F0F0;
    transition: background 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #F5F5F5;
}

.autocomplete-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.autocomplete-item small {
    color: var(--text-light);
    font-size: 13px;
}

.form-group {
    position: relative;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: #F9F9F9;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked~.radio-custom {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.radio-label input[type="radio"]:checked~.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-label input[type="radio"]:checked {
    &~.radio-text {
        font-weight: 600;
    }
}

.priority-urgent input[type="radio"]:checked~.radio-custom {
    background: var(--urgent-color);
    border-color: var(--urgent-color);
}

.priority-medium input[type="radio"]:checked~.radio-custom {
    background: var(--medium-color);
    border-color: var(--medium-color);
}

.priority-normal input[type="radio"]:checked~.radio-custom {
    background: var(--normal-color);
    border-color: var(--normal-color);
}

.radio-text {
    font-size: 15px;
    color: var(--text-dark);
}

/* ===================================
   Form Actions
   =================================== */

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit,
.btn-back {
    flex: 1;
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 179, 66, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-back {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-back:hover {
    background: var(--primary-color);
    color: white;
}

.btn-loader {
    display: none;
}

.btn-loader.active {
    display: inline;
}

.btn-text.hidden,
.btn-loader.hidden {
    display: none;
}

/* ===================================
   Success Message
   =================================== */

.success-message {
    background: var(--card-bg);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    font-size: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: zoomIn 0.6s ease-out;
}

.success-message h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 15px;
}

.success-message p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-new,
.btn-dashboard {
    display: inline-block;
    padding: 14px 28px;
    margin: 5px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-new {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-new:hover {
    background: var(--primary-dark);
}

.btn-dashboard {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-dashboard:hover {
    background: var(--primary-color);
    color: white;
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .header,
    .complaint-form {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-label {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .success-message {
        padding: 40px 20px;
    }
}