@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Green theme */
    --primary-color: #2e7d32; 
    --primary-light: #60ad5e; 
    --primary-dark: #005005; 
    --secondary-color: #f5f7fa;
    --accent-color: #ff8f00; 
    --text-color: #333;
    --error-color: #d32f2f;
    --success-color: #2e7d32;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f7f7f7;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #e4f0e8 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    background-color: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

h1 {
    color: var(--text-color);
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

.general-error-container {
    background-color: rgba(211, 47, 47, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    display: none;
}

.general-error-container.visible {
    display: block;
}

#general-error {
    color: var(--error-color);
    font-size: 14px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="date"] {
    width: 100%;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

/* Checkbox styling */
.checkbox {
    margin-bottom: 20px;
    position: relative;
    padding-left: 35px; 
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    display: block;
}

.checkbox label {
    display: inline;
    cursor: pointer;
    color: var(--text-color);
    font-weight: 400;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox:hover input ~ .checkmark {
    background-color: #e9e9e9;
}

.checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-light) 100%);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox input:checked ~ .checkmark:after {
    display: block;
}

.checkbox .checkmark:after {
    left: 8px;
    top: 4px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

button[type="submit"] {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

.error-message {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Success Popup */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    z-index: 1001;
    display: none;
    width: 90%;
    max-width: 400px;
}

.popup-container h2 {
    color: var(--success-color);
    margin-bottom: 15px;
}

.popup-container p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

#close-popup {
    padding: 10px 40px;
    background: linear-gradient(135deg, var(--success-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#close-popup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.3);
}

/* Input validation styles */
input.error {
    border-color: var(--error-color);
    background-color: rgba(211, 47, 47, 0.05);
}

/* Responsive */
@media (max-width: 576px) {
    .container {
        padding: 30px 20px;
    }
    
    .popup-container {
        padding: 30px 20px;
    }
    
    .checkbox {
        padding-left: 30px;
    }
    
    .checkmark {
        height: 20px;
        width: 20px;
    }
    
    .checkbox .checkmark:after {
        left: 7px;
        top: 3px;
        width: 4px;
        height: 9px;
    }
}