/* RegisterStyle.css */

/* General Body Styling */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif; /* Using Poppins as a modern, clean font */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Full viewport height */
    background-color: #f0f2f5; /* A light, neutral background color */
    background-image: url(Images/RegisterBackground.jpg); /* **EXAMPLE IMAGE: CHANGE THIS TO YOUR IMAGE PATH** */
    background-size: cover; /* Cover the entire area */
    background-position: center; /* Center the background image */
    background-repeat: no-repeat; /* Do not repeat the image */
    background-attachment: fixed; /* Keep the background fixed during scroll */
    color: #333; /* Default text color */
}

/* You can also use a linear-gradient for the background if you prefer: */
/*
body {
    background: linear-gradient(to right, #6a11cb, #2575fc);
}
*/

/* Or a solid color: */
/*
body {
    background-color: #8A2BE2; / * Violet color * /
}
*/

/* Container for the form box and wrapper */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Max width for content */
    padding: 20px;
    box-sizing: border-box;
}

/* Main box styling (the form itself) */
.box {
    background: rgba(255, 255, 255, 0.95); /* Slightly transparent white background */
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px; /* Max width for the form box */
    text-align: center;
    position: relative;
    z-index: 2; /* Ensure the box is above the wrapper if it overlaps */
}

/* Header styling */
.header {
    margin-bottom: 30px;
}

.header img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block; /* Ensures proper spacing */
    margin-left: auto;
    margin-right: auto;
}

.header p {
    font-size: 1.2em;
    color: #555;
    margin: 0;
}

/* Section headings (e.g., Account Details, Personal Information) */
h3 {
    color: #4CAF50; /* Green color for headings */
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Input box container */
.input-box {
    position: relative;
    margin-bottom: 25px;
    text-align: left; /* Align labels and inputs to the left */
}

.input-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-box .required {
    color: #dc3545; /* Red color for required asterisk */
    margin-left: 4px;
}

.input-field {
    width: calc(100% - 40px); /* Adjust for icon padding */
    padding: 12px 15px 12px 40px; /* Padding for text and icon */
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    color: #333;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    border-color: #4CAF50; /* Green border on focus */
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.input-box i {
    position: absolute;
    left: 15px;
    top: 65%; /* Adjust icon vertical position */
    transform: translateY(-50%);
    color: #888;
    font-size: 1.2em;
}

textarea.input-field {
    resize: vertical; /* Allow vertical resizing */
    min-height: 80px;
    padding-top: 10px; /* Adjust padding for textarea */
}

/* Radio button group */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    justify-content: flex-start; /* Align radio buttons to the left */
}

.radio-group input[type="radio"] {
    margin-right: 5px;
    accent-color: #4CAF50; /* Green accent color for radio buttons */
}

.radio-group label {
    font-weight: normal; /* Override bold for radio labels */
    margin-bottom: 0;
    display: inline-block;
}

/* Submit button */
.input-submit {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50; /* Green submit button */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

.input-submit:hover {
    background-color: #45a049; /* Darker green on hover */
    transform: translateY(-2px);
}

/* Bottom link */
.bottom {
    margin-top: 30px;
    font-size: 0.95em;
    color: #555;
}

.bottom a {
    color: #4CAF50; /* Green link color */
    text-decoration: none;
    font-weight: 600;
}

.bottom a:hover {
    text-decoration: underline;
}

/* Message Box for PHP feedback */
.message-box {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    word-wrap: break-word; /* Ensure long messages break correctly */
}

.message-box.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-box.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Camera Container Styles */
.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 20px;
    border: 1px dashed #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
}

.camera-container .help-text {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-bottom: 10px;
}

#webcamVideo {
    width: 100%;
    max-width: 320px; /* Standard webcam feed width */
    height: auto;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    background-color: #000; /* Black background for video area */
    display: none; /* Hidden by default */
    transform: scaleX(-1); /* Mirror the webcam feed */
}

#capturedImagePreview {
    width: 100%;
    max-width: 320px;
    height: auto;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    display: none; /* Hidden by default */
}

.camera-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.camera-button {
    padding: 10px 20px;
    background-color: #2196F3; /* Blue for camera buttons */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.camera-button:hover {
    background-color: #1976D2; /* Darker blue on hover */
}

.camera-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Optional: A pseudo-element or separate div for an abstract background effect */
.wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Behind the form box */
}

.wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(76, 175, 80, 0.2) 0%, transparent 70%); /* Subtle green radial gradient */
    animation: rotateGradient 20s linear infinite;
    opacity: 0.7;
}

@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .box {
        padding: 30px;
        margin: 15px;
    }

    .input-box i {
        top: 55%; /* Adjust icon position for smaller screens */
    }
}

@media (max-width: 480px) {
    .box {
        padding: 20px;
    }

    .header img {
        max-width: 250px;
    }

    .input-field {
        padding: 10px 10px 10px 35px;
    }

    .input-box i {
        left: 10px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}