/* Form styles and layout */

/* Top info paragraph */
p.top-info {
    margin: 10px 0;
}

/* Form container */
.testbox {
    display: flex;
    justify-content: center;
    align-items: center;
    height: inherit;
    padding: 20px;
}

/* Form styling */
form {
    width: 100%;
    padding: 20px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 0 25px 0 #1c87c9; 
}

/* Input, select, and textarea base styles */
input, select, textarea {
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

input {
    width: calc(100% - 10px);
    padding: 5px;
}

input[type='date'] {
    padding: 4px 5px;
}

select {
    width: 100%;
    padding: 7px 0;
    background: transparent;
}

/* Hover effects */
.item:hover p, .item:hover i, .question:hover p, .question label:hover, input:hover::placeholder {
    color: #1c87c9;
}

.item input:hover, .item select:hover {
    border: 1px solid transparent;
    box-shadow: 0 0 6px 0 #1c87c9;
    color: #1c87c9;
}

/* Form items */
.item {
    position: relative;
    margin: 10px 0;
}

/* Date input styling */
input[type='date']::-webkit-inner-spin-button {
    display: none;
}

.item i, input[type='date']::-webkit-calendar-picker-indicator {
    position: absolute;
    font-size: 20px;
    color: #a9a9a9;
}

.item i {
    right: 2%;
    top: 30px;
    z-index: 1;
}

[type='date']::-webkit-calendar-picker-indicator {
    right: 1%;
    z-index: 2;
    opacity: 0;
    cursor: pointer;
}

/* Radio button styles */
input[type=radio] {
    display: none;
}

label.radio {
    position: relative;
    display: inline-block;
    margin: 5px 20px 10px 0;
    cursor: pointer;
}

.question span {
    margin-left: 30px;
}

span.required {
    margin-left: 0;
    color: red;
}

label.radio:before {
    content: '';
    position: absolute;
    left: 0;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid #ccc;
}

input[type=radio]:checked + label:before, label.radio:hover:before {
    border: 2px solid #1c87c9;
}

label.radio:after {
    content: '';
    position: absolute;
    top: 6px;
    left: 5px;
    width: 8px;
    height: 4px;
    border: 3px solid #1c87c9;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    opacity: 0;
}

input[type=radio]:checked + label:after {
    opacity: 1;
}

/* Button styles */
.btn-block {
    margin-top: 10px;
    text-align: center;
}

button {
    width: auto;
    padding: 10px;
    border: none;
    border-radius: 5px; 
    background: #1c87c9;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

button:hover {
    background: #1e6fa0;
}

/* Responsive form layout */
@media (min-width: 568px) {
    .name-item, .contact-item, .position-item {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .name-item input {
        width: calc(50% - 20px);
    }
    
    .contact-item .item, .position-item .item {
        width: calc(50% - 8px);
    }
    
    .contact-item input, .position-item input {
        width: calc(100% - 12px);
    }
    
    .position-item select {
        width: 100%;
    }
}