/* ====================== POLL STYLES ====================== */
/*.polls-container {*/
/*    max-width: 520px;*/
/*    margin: 40px auto;*/
/*    padding: 0 15px;*/
/*}*/

.poll-form,
.candidate-form {
    background-color: #EFEFF5;           /* exact color from your .flex-item */
    border: 3px solid tomato;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 10px;
}

.poll-form:hover,
.candidate-form:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.poll-form fieldset,
.candidate-form fieldset {
    border: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.poll-form input[type="text"],
.candidate-form input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.poll-form input[type="text"]:focus,
.candidate-form input[type="text"]:focus {
    outline: none;
    border-color: tomato;
    box-shadow: 0 0 0 4px rgba(255, 99, 71, 0.15);
}

.poll-form input[type="submit"],
.candidate-form input[type="submit"] {
    width: 100%;
    background-color: tomato;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    padding: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poll-form input[type="submit"]:hover,
.candidate-form input[type="submit"]:hover {
    background-color: #ff4500;           /* darker tomato on hover */
    transform: scale(1.03);
}

/* Success message styling (the HTML you return from the first view) */
#poll-id .success {
    background-color: #EFEFF5;
    border: 3px solid tomato;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    color: #222;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Hidden poll_id field (invisible but still works perfectly) */
#poll-id input[type="hidden"] {
    display: none;
}
/*Layout styling*/
.main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.left-column {
    flex: 1;                    /* left column takes ~half the space */
}

.right-column {
    flex: 1;                    /* right column takes ~half the space */
}

/* Optional titles (feel free to remove if you don't want them) */
.left-column::before,
.right-column::before {
    content: attr(data-title);
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}
.left-column::before  { content: "Create Poll"; }
.right-column::before { content: "Poll Details & Candidates"; }

/* Placeholder styling (before poll is created) */
#poll-id .placeholder {
    background-color: #EFEFF5;
    border: 3px solid tomato;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    color: #555;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
/* ====================== HIDE CANDIDATE FORM UNTIL POLL IS CREATED ====================== */
.candidate-form.hidden {
    display: none !important;
}

/* When we remove the .hidden class, the form instantly appears with all your nice styling */
.candidate-form {
    /* your existing card styles stay exactly the same */
    background-color: #EFEFF5;
    border: 3px solid tomato;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Rest of your existing styles (poll-form, .success, .placeholder, etc.) remain unchanged */
/* Optional: make the whole page feel consistent with your .flex-item cards */
.flex-item {
    /* your original styles stay untouched */
    background-color: #EFEFF5;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid tomato;
    width: 300px;
    height: 400px;
    margin-top: 10px;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}