/* shared.css */
body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 60px;
}

/* Poll list specific styles */
.poll-list {
    list-style: none;
    padding: 0;
}

.poll-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 4px;
}

.poll-title {
    font-size: 1.2em;
    margin: 0 0 10px 0;
}

.poll-date {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

/* Adjust link margin */
.poll-item .link {
    display: block;
    margin-top: 8px;
    /* Added margin for better spacing */
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
}

textarea {
    height: 200px;
    resize: vertical;
}

/* Password section styles */
#passwordSection {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

#passwordSection label {
    margin-top: 5px;
    margin-bottom: 0px;
}

input[type="password"] {
    flex-grow: 1;
    padding: 8px;
    box-sizing: border-box;
    margin-top: 0px;
}

button {
    padding: 8px 16px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0;
}

button:hover {
    background-color: #45a049;
}

button:focus {
    outline: none;
}

/* Button and link styles */
.button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}

.button:hover {
    background-color: #45a049;
}

.link {
    color: #2196F3;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
}

/* Error message */
.error {
    color: red;
    width: 100%;
    margin-bottom: 8px;
    margin-top: 0;
}

/* Poll form specific styles */
.poll-form table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.poll-form th,
.poll-form td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.poll-form th {
    background-color: #f4f4f4;
}

.poll-form .radio-group {
    text-align: center;
}

.poll-form .question-text {
    min-width: 300px;
}

/* Prevent clicking the label from focusing the input element */
.poll-form label[for="color"] {
    pointer-events: none;
}

.poll-form input[type="color"][readonly] {
    background-color: #eee;
    cursor: not-allowed !important;
    pointer-events: none;
    z-index: 10;
}

.poll-form input[type="color"][readonly]:hover {
    cursor: not-allowed;
}

/* Wide layout for poll form */
.wide-layout {
    max-width: 1200px;
}

/* Info text */
.info-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.delete-link {
    color: red;
}

.delete-link:hover {
    text-decoration: underline;
}

.button.danger {
    background-color: #f44336;
    /* Red color for danger button */
}

.button.danger:hover {
    background-color: #d32f2f;
    /* Darker red on hover */
}

/* Tooltip styles */
.tooltip-icon {
    display: inline-block;
    margin-left: 5px;
    cursor: pointer;
    background-color: #f1f1f1;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-weight: bold;
    color: #000;
}

.tooltip-text {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 1;
}

.tooltip-icon:hover+.tooltip-text,
.tooltip-icon:focus+.tooltip-text {
    display: block;
}

/* Overlay styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 5px #000;
    text-align: center;
    max-width: 600px;
    width: 90%;
}