/* style.css */

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333333;
    line-height: 1.6;
    padding: 20px;
}

/* Center the form and add padding */
form {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px 40px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Form Title */
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2em;
}

/* Labels Styling */
label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 1rem;
}

/* Input Fields Styling */
input[type="text"],
input[type="date"],
input[type="email"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    border-color: #2980b9;
    box-shadow: 0 0 5px rgba(41, 128, 185, 0.5);
    outline: none;
}

/* Checkbox Group Styling */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.checkbox-group div {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-weight: 500;
}

/* Dance Item Styling */
.dance-item,
.participant-item {
    background-color: #ecf0f1;
    padding: 20px;
    border: 1px solid #dcdde1;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s;
}

.dance-item:hover,
.participant-item:hover {
    background-color: #dfe6e9;
    border-color: #a4b0be;
}

.dance-item label,
.participant-item label {
    margin-bottom: 5px;
    font-weight: 500;
}

.dance-item input[type="text"],
.participant-item input[type="text"],
.participant-item input[type="date"],
.participant-item input[type="email"] {
    margin-bottom: 15px;
}

/* Remove Participant Button */
.remove-participant {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.remove-participant:hover {
    background-color: #c0392b;
}

/* Buttons Styling */
button,
input[type="submit"] {
    background-color: #27ae60;
    color: #ffffff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover,
input[type="submit"]:hover {
    background-color: #219150;
}

button:active,
input[type="submit"]:active {
    transform: scale(0.98);
}

/* Add Dance and Add Participant Button Specific Styling */
button.add-button {
    background-color: #2980b9;
    margin-bottom: 20px;
}

button.add-button:hover {
    background-color: #1c5980;
}

/* Success and Error Messages */
.success-message,
.error-message {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 1rem;
}

.success-message {
    background-color: #2ecc71;
    color: #ffffff;
    border: 1px solid #27ae60;
}

.error-message {
    background-color: #e74c3c;
    color: #ffffff;
    border: 1px solid #c0392b;
}

/* Responsive Design for Tablets and Mobile Devices */
@media (max-width: 1024px) {
    form {
        padding: 25px 30px;
    }

    h1 {
        font-size: 1.8em;
    }

    button,
    input[type="submit"] {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .checkbox-group div {
        flex: 1 1 100%;
    }

    .dance-item,
    .participant-item {
        padding: 15px;
    }
}

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

    form {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    label {
        font-size: 0.9rem;
    }

    input[type="text"],
    input[type="date"],
    input[type="email"],
    input[type="file"],
    select,
    textarea {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    button,
    input[type="submit"] {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .remove-participant {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}
