/*
Theme Name: Prodüksiyon Takip Teması
Author: Your Name
Description: A WordPress theme for production tracking.
Version: 1.0.0
*/

/* Define CSS Variables for a modern palette */
:root {
    --primary-blue: #007bff;
    --dark-blue: #0056b3;
    --success-green: #28a745;
    --dark-success-green: #218838;
    --danger-red: #dc3545;
    --dark-danger-red: #c82333;
    --body-bg: #f8f9fa;
    --form-bg: #ffffff;
    --text-dark: #343a40;
    --text-medium: #6c757d;
    --border-light: #dee2e6;
    --border-medium: #adb5bd;
    --fieldset-bg: #fdfdfd;
    --legend-bg: #e9ecef;
    --sub-legend-bg: #e2e6ea;
    --filled-bg: #e6ffe6; /* Light green for filled state */
    --filled-border: #28a745; /* Green border for filled state */
}

#production-form-container {
    font-family: 'Roboto', sans-serif; /* Modern sans-serif font */
    background-color: var(--body-bg); /* Light gray background */
    color: var(--text-dark); /* Dark text */
    line-height: 1.6;
    margin: 0;
    padding: 20px; /* Add some padding around the whole page */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Center content */
    gap: 40px; /* Space between form and tracker */
    max-width: 1400px; /* Max width for the entire layout */
    margin: 0 auto; /* Center the container */
    padding-top: 20px; /* Add some top padding to the container */
}

#production-form-container form {
    font-family: 'Roboto', sans-serif;
    padding: 40px;
    border: 1px solid var(--border-light); /* Subtle border */
    flex: 2; /* Allow form to take more space */
    min-width: 600px; /* Minimum width for the form */
    max-width: 800px; /* Max width for the form */
    background-color: var(--form-bg); /* White background */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05); /* Soft shadow */
    border-radius: 0.5rem; /* Slightly rounded corners */
    margin-bottom: 20px; /* Add some bottom margin for spacing */
}

#production-form-container #downloadPdfBtn {
    margin-top: 0; /* Reset margin-top as it's now part of the flex flow */
    width: fit-content; /* Adjust button width */
    align-self: flex-start; /* Align to the start of the flex container */
    margin-left: 0; /* Reset margin-left */
    margin-bottom: 20px; /* Add some bottom margin */
}

#production-form-container h2 {
    color: var(--text-dark);
    text-align: center; /* Center align for modern forms */
    margin-bottom: 25px;
    font-weight: 700; /* Bolder for headings */
    border-bottom: none;
    padding-bottom: 15px;
    font-size: 2em;
}

/* Progress Tracker Styling */
#production-form-container .progress-tracker {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background-color: var(--form-bg);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.08);
    padding: 30px;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    height: fit-content;
    overflow-y: auto; /* Enable scrolling if content overflows */
    max-height: calc(100vh - 40px); /* Limit height to viewport minus padding */
}

#production-form-container .progress-tracker h3 {
    color: var(--primary-blue);
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: none;
    padding-bottom: 12px;
    text-align: left; /* Align heading left */
}

#production-form-container .checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

#production-form-container .checklist li {
    display: flex;
    align-items: center; /* Center align icon and text vertically */
    margin-bottom: 18px;
    font-size: 1.05em;
    color: var(--text-medium);
    line-height: 1.4; /* Slightly reduced line height for tighter look */
    font-weight: 400;
}

#production-form-container .checklist .sub-checklist {
    list-style: none;
    padding-left: 35px; /* Increased indentation for sub-items */
    margin-top: 8px;
    width: 100%;
    position: relative; /* For the vertical line */
}

#production-form-container .checklist .sub-checklist::before {
    content: '';
    position: absolute;
    left: 10px; /* Position the line */
    top: 0;
    bottom: 0;
    width: 2px; /* Thickness of the line */
    background-color: var(--border-light); /* Color of the line */
    border-radius: 1px;
}

#production-form-container .checklist .sub-checklist li {
    font-size: 0.95em; /* Slightly larger font for sub-items */
    margin-bottom: 15px; /* Adjusted margin */
    position: relative; /* For connecting line to sub-items */
}

#production-form-container .checklist .sub-checklist li:last-child {
    margin-bottom: 0; /* No margin for the last sub-item */
}

#production-form-container .checkbox-icon {
    display: inline-block;
    width: 20px; /* Slightly smaller icon for better balance */
    height: 20px; /* Slightly smaller icon */
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    margin-right: 10px; /* Adjusted margin */
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

#production-form-container .checklist li.completed .checkbox-icon {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

#production-form-container .checklist li.completed .checkbox-icon::before {
    content: '✔';
    color: white;
    font-size: 13px; /* Adjusted checkmark size */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#production-form-container .checklist li.completed {
    color: var(--text-dark);
    font-weight: 500;
}

/* Responsive adjustments for main-container */
@media (max-width: 1024px) {
    #production-form-container {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items when stacked */
        gap: 20px;
    }

    #production-form-container form {
        min-width: unset; /* Remove min-width constraint */
        width: 100%; /* Take full width */
        max-width: 800px; /* Keep max-width */
    }

    #production-form-container .progress-tracker {
        min-width: unset; /* Remove min-width constraint */
        width: 100%; /* Take full width */
        max-width: 800px; /* Match form max-width */
        position: static; /* Remove sticky positioning on small screens */
    }

    #production-form-container #downloadPdfBtn {
        width: 100%; /* Full width button */
        max-width: 800px; /* Match form max-width */
    }
}
/* End Progress Tracker Styling */

/* Fieldset and legend styling */
#production-form-container fieldset {
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid var(--border-medium); /* Medium border */
    border-radius: 0.5rem; /* Rounded corners */
    background-color: var(--fieldset-bg); /* Slightly off-white */
    box-shadow: none;
    transition: all 0.3s ease; /* Smooth transitions */
}

#production-form-container fieldset:hover {
    transform: translateY(-3px); /* Subtle lift on hover */
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1); /* More prominent shadow on hover */
}

/* Sub-fieldset styling for nested sections */
#production-form-container .sub-fieldset {
    border: 1px solid var(--border-light); /* Lighter border for separation */
    border-radius: 0.4rem; /* Slightly smaller rounded corners */
    padding: 20px;
    margin-bottom: 25px;
    background-color: var(--form-bg); /* White background */
    box-shadow: none;
}

#production-form-container .sub-fieldset legend {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-dark);
    padding: 8px 15px;
    background-color: var(--sub-legend-bg); /* Light background for sub-legend */
    border-radius: 0.3rem; /* Rounded corners */
    margin-bottom: 15px;
    border: 1px solid var(--border-light);
}

#production-form-container legend {
    font-weight: 600;
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 0.4rem; /* Rounded corners */
    background-color: var(--legend-bg); /* Light background for legend */
    border: none;
    font-size: 1.2em;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

/* Label styling */
#production-form-container label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1em;
}

/* Input and textarea styling */
#production-form-container input[type="text"],
#production-form-container input[type="date"],
#production-form-container textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-medium); /* Medium border */
    border-radius: 0.3rem; /* Slightly rounded corners */
    box-sizing: border-box;
    font-size: 16px;
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#production-form-container input[type="text"]:focus,
#production-form-container input[type="date"]:focus,
#production-form-container textarea:focus {
    border-color: var(--primary-blue); /* Primary color on focus */
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* Focus ring effect */
}

#production-form-container textarea {
    resize: vertical;
    min-height: 100px; /* Slightly reduced min-height */
}

/* Radio button styling */
#production-form-container input[type="radio"] {
    margin-right: 8px;
    vertical-align: middle;
    accent-color: var(--primary-blue); /* Primary color accent for radio buttons */
}

/* Checkbox styling */
#production-form-container input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
    accent-color: var(--primary-blue); /* Primary color accent for checkboxes */
}

/* Input with icon styling */
#production-form-container .input-with-icon {
    position: relative;
    margin-bottom: 20px;
}

#production-form-container .input-with-icon input[type="date"] {
    padding-right: 40px;
    margin-bottom: 0;
}

#production-form-container .input-with-icon .icon-calendar {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium); /* Medium gray icon color */
    font-size: 1.2em;
    pointer-events: none;
}

/* Collapsible fieldset styling */
#production-form-container .collapsible-legend {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

#production-form-container .collapsible-legend .toggle-icon {
    font-size: 0.8em;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

#production-form-container .fieldset-content {
    padding-top: 15px;
}

/* Button styling */
#production-form-container button[type="submit"],
#production-form-container .clear-signature,
#production-form-container #downloadPdfBtn,
#production-form-container #saveButton,
#production-form-container #resetButton {
    background-color: var(--primary-blue); /* Primary blue for main action */
    color: white;
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    border-radius: 0.3rem; /* Slightly rounded corners */
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    display: inline-block;
    margin: 25px 10px 0; /* Adjusted margin for spacing between buttons */
    min-width: 120px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
    text-transform: none;
    letter-spacing: normal;
    background-image: linear-gradient(to bottom right, var(--primary-blue), var(--dark-blue)); /* Subtle gradient */
}

#production-form-container button[type="submit"]:hover,
#production-form-container .clear-signature:hover,
#production-form-container #downloadPdfBtn:hover,
#production-form-container #saveButton:hover {
    background-color: var(--dark-blue); /* Darker blue on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Larger shadow on hover */
    transform: translateY(-2px); /* Subtle lift */
    background-image: linear-gradient(to bottom right, var(--dark-blue), var(--primary-blue)); /* Reverse gradient on hover */
}

#production-form-container button[type="submit"]:active,
#production-form-container .clear-signature:active,
#production-form-container #downloadPdfBtn:active,
#production-form-container #saveButton:active {
    background-color: var(--dark-blue); /* Even darker on active */
    transform: translateY(0); /* Reset lift */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Smaller shadow on click */
    background-image: linear-gradient(to bottom right, var(--dark-blue), var(--dark-blue)); /* Solid darker color on active */
}

/* Specific button overrides for reset button */
#production-form-container #resetButton {
    background-color: var(--danger-red); /* Danger red for reset action */
    background-image: linear-gradient(to bottom right, var(--danger-red), var(--dark-danger-red));
}

#production-form-container #resetButton:hover {
    background-color: var(--dark-danger-red);
    background-image: linear-gradient(to bottom right, var(--dark-danger-red), var(--danger-red));
}

#production-form-container #resetButton:active {
    background-color: var(--dark-danger-red);
    background-image: linear-gradient(to bottom right, var(--dark-danger-red), var(--dark-danger-red));
}

/* Paragraph styling within fieldset for EKİP */
#production-form-container fieldset p {
    color: var(--text-medium); /* Medium text color */
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 0.95em;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    #production-form-container {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items when stacked */
        gap: 20px;
    }

    #production-form-container form {
        min-width: unset; /* Remove min-width constraint */
        width: 100%; /* Take full width */
        max-width: 800px; /* Keep max-width */
    }

    #production-form-container .progress-tracker {
        min-width: unset; /* Remove min-width constraint */
        width: 100%; /* Take full width */
        max-width: 800px; /* Match form max-width */
        position: static; /* Remove sticky positioning on small screens */
    }

    #production-form-container #downloadPdfBtn {
        width: 100%; /* Full width button */
        max-width: 800px; /* Match form max-width */
    }
}

@media (max-width: 480px) {
    #production-form-container button[type="submit"],
    #production-form-container .clear-signature,
    #production-form-container #downloadPdfBtn,
    #production-form-container #saveButton,
    #production-form-container #resetButton {
        display: block;
        width: 100%;
        margin: 10px auto;
    }
}

/* Reset confirmation styling (assuming these are still used, though prompt is used now) */
#production-form-container #reset-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--form-bg);
    padding: 20px;
    border: 1px solid var(--border-medium);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: center;
    border-radius: 0.5rem;
}

#production-form-container #reset-confirmation p {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-dark);
}

/* Signature Clear Confirmation Styling */
#production-form-container #signature-clear-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--form-bg);
    padding: 20px;
    border: 1px solid var(--border-medium);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: center;
    border-radius: 0.5rem;
}

#production-form-container #signature-clear-confirmation p {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-dark);
}

/* Signature Pad Styling */
#production-form-container .signature-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light); /* Light separator */
}

#production-form-container .signature-section label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

#production-form-container .signature-pad {
    display: block;
    border: 1px solid var(--border-medium); /* Medium border color */
    border-radius: 0.3rem; /* Rounded corners */
    background-color: var(--fieldset-bg);
    box-shadow: none;
    margin-top: 10px;
    touch-action: none;
    width: 100%; /* Make it responsive */
    max-width: 400px; /* Max width for larger screens */
    height: 200px; /* Fixed height */
}

/* Styles for filled inputs and checkboxes */
#production-form-container .filled {
    background-color: var(--filled-bg); /* Light green background */
    border-color: var(--filled-border) !important; /* Green border */
}

/* Apply background to input types and textarea when filled */
#production-form-container input[type="text"].filled,
#production-form-container input[type="date"].filled,
#production-form-container textarea.filled {
    background-color: var(--filled-bg);
}

/* Style for filled checkboxes and radio buttons */
#production-form-container input[type="checkbox"].filled,
#production-form-container input[type="radio"].filled {
    accent-color: var(--filled-border); /* Green accent for checked state */
    background-color: var(--filled-bg); /* Light green background for the element itself */
    border: 1px solid var(--filled-border); /* Green border for the element */
}

#production-form-container .filled[readonly], #production-form-container .filled[disabled] {
    cursor: not-allowed;
}

#production-form-container .confirmation-dialog {
    font-family: 'Roboto', sans-serif;
}

#production-form-container .confirmation-dialog .btn {
    font-family: 'Roboto', sans-serif;
}

#production-form-container .form-control {
    font-family: 'Roboto', sans-serif;
}
