/* style.css */

/* Ogólne style formularza */
#betlewski-complains-form {
    font-family: "Montserrat", Sans-serif;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #e6e2e7;
}

#betlewski-complains-form label {
    display: block;
    margin-bottom: 5px;
    margin-top: 5px;;
    font-weight: bold;
}

/* Stylizacja opisu pola */
#betlewski-complains-form .field-description {
    display: block;
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 5px;
    color: #555;
}

#betlewski-complains-form input[type="text"],
#betlewski-complains-form input[type="email"],
#betlewski-complains-form select,
#betlewski-complains-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

#betlewski-complains-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Stylizacja pola select z id "status" */
#betlewski-complains-form select#status {
    font-family: inherit;
    color: #000;
    line-height: normal;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Stylizowany przycisk wyboru plików */
#file-button {
    background-color: #98999b;
    color: #fff;
    padding: 10px 20px;
    cursor: pointer;
    display: inline-block;
    border-radius: 3px;
    text-align: center;
    transition: background-color 0.3s ease;
    margin-bottom: 15px;
}

#file-button:hover {
    background-color: #bfc0c1;
}

/* Ukrywanie systemowego przycisku wyboru plików */
#photos {
    display: none;
}

/* Podgląd obrazków */
#file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.preview-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
}

.preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: rgba(255, 0, 0, 0.8);
    color: #fff;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.remove-preview:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* Stylizacja przycisku wysyłki */
#submit-button {
    margin-top: 20px;
    background-color: #A3004F;
    color: #fff;
    padding: 16px 31px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

#submit-button:hover {
    background-color: #b71463;
}

/* Stylizacja checkboxów */

/* Ogólne style dla checkboxów */
#betlewski-complains-form input[type="checkbox"] {
    position: relative;
    width: 20px;
    height: 20px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid #ccc;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Stylizacja po najechaniu kursorem */
#betlewski-complains-form input[type="checkbox"]:hover {
    border-color: #A3004F;
}

/* Stylizacja po zaznaczeniu */
#betlewski-complains-form input[type="checkbox"]:checked {
    background-color: #A3004F;
    border-color: #A3004F;
}

#betlewski-complains-form input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Wyrównanie checkboxów i tekstu w sekcji expectations */
.expectations-group label {
    display: flex;
    align-items: center; /* Wyśrodkowanie pionowe checkboxów i tekstu */
    margin-bottom: 10px;
}

.expectations-group label span {
    vertical-align: top;
}

.expectations-group {
    margin-bottom: 15px;
}

/* Stylizacja dla consent-group z dwoma osobnymi blokami */
.consent-group {
    display: flex;
    align-items: flex-start; /* Wyrównanie do góry */
    gap: 10px; /* Odstęp między checkboxem a tekstem */
    font-size: 12px;
}

.consent-group .checkbox-wrapper {
    flex-shrink: 0; /* Zapobiega zmianie rozmiaru checkboxa */
}

.consent-group .text-wrapper {
    flex: 1; /* Pozwala tekstowi zajmować resztę dostępnej szerokości */
    line-height: 1.4; /* Ustawia odpowiedni odstęp w liniach tekstu */
}

/* Centrowanie przycisku wysyłki */
.form-group.submit-group {
    text-align: center;
}

/* Komunikaty sukcesu i błędów */
.updated,
.error {
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-family: inherit;
    text-align: center; /* Dodano tę linię, aby wyśrodkować tekst */
}

.updated {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* Responsywność */
@media (max-width: 600px) {
    #file-previews {
        justify-content: center;
    }

    .preview-wrapper {
        width: 80px;
        height: 80px;
    }

    .remove-preview {
        width: 18px;
        height: 18px;
        line-height: 16px;
        font-size: 12px;
    }
}
