﻿
:root {
    --primary-color: #4E2683;
    --primary-light: #7b4cb4;
    --primary-medium: #a680da;
    --primary-lighter: #EEE6FA;
    --primary-dark: #36185c;
    --text-light: #ffffff;
    --text-dark: #1e1e1e;
    --border-color: #c5a9e5;
    --hover-bg: #36185c;
    --hover-text: #ffffff;
    --form-shadow: rgba(78, 38, 131, 0.1);
    --light-navy: #8f94fb;
}

/* Card-like container for the form */
#content .container form {
    background: var(--form-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px var(--form-shadow);
}
/* Ensure form container fits small screens */
#content .container form {
    padding: 1rem;
}

/* Make nested fields stack nicely */
@media (max-width: 576px) {
    .row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Reduce spacing for mobile */
    .pb-2 {
        padding-bottom: 0.5rem !important;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    /* Modal padding for mobile */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 10px;
    }
}
/* Make inputs and textareas larger on mobile */
@media (max-width: 576px) {
    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 1rem; /* Increase text size */
        height: 35px; /* Taller input fields */
        padding: 0.5rem 0.75rem;
    }

    textarea.form-control {
        min-height: 80px; /* Make textareas taller */
    }

    /* Add New Field link bigger for tap targets */
    .add-custom-field-link {
        font-size: 1rem;
        padding: 0.5rem 0;
        display: inline-flex;
        align-items: center;
    }

        .add-custom-field-link svg {
            width: 28px;
            height: 28px;
        }

    /* Better spacing between fields */
    .mb-3, .mb-4 {
        margin-bottom: 1rem !important;
    }
}
/* Mobile adjustments for links and buttons */
@media (max-width: 576px) {

    /* Buttons */
    .btn-lg {
        font-size: 1rem; /* Bigger text */
        padding: 0.75rem 1.5rem; /* More touch area */
        border-radius: 10px;
    }

    /* Add New Field link */
    .add-custom-field-link {
        font-size: 3rem;
        padding: 0.5rem 0;
    }

        /* Plus icon next to Add New Field */
        .add-custom-field-link .plus-icon svg {
            width: 20px;
            height: 20px;
        }

    /* Make all input text readable */
    .form-control,
    .form-select {
        font-size: 1rem; /* Increased for better readability */
        padding: 0.6rem 0.75rem;
    }
}

@media (max-width: 576px) {
    #content .container {
        padding: 0 0.75rem; /* Reduce side padding */
    }

        #content .container form {
            padding: 1rem;
            border-radius: 10px;
        }
}
@media (max-width: 576px) {
    .btn {
        font-size: 3rem;
        padding: 1rem 1.5rem;
        border-radius: 10px;
    }
}
@media (max-width: 576px) {
    body {
        overflow-x: hidden;
    }

    form {
        max-width: 100%;
    }
}
/* Add top padding in mobile view */
@media (max-width: 576px) {
    #content .container {
        padding-top: 70px; /* Adjust as needed */
    }

        /* Optional: reduce side padding for mobile */
        #content .container form {
            padding: 1rem;
        }
}

/* Responsive input and textarea font size */
@media (max-width: 576px) {
    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 14px; /* Recommended minimum for mobile to prevent zoom */
        line-height: 1.4;
        min-height: 35px;
        padding: 0.6rem 0.75rem; /* Bigger touch area */
    }

    /* Textarea taller for readability */
    textarea.form-control {
        min-height: 90px;
    }
}



/* Label styling */
.form-label {
    font-weight: 600;
    color: var(--primary-dark);
}

.form-control,
.form-select {
    border: 1px solid var(--primary-medium);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(78, 38, 131, 0.1);
    transition: all 0.2s ease-in-out;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-light);
        box-shadow: 0 0 0 0.2rem rgba(78, 38, 131, 0.25);
    }
    .form-select option {
        color: var(--text-dark);
        background-color: #fff;
    }
.auto-width-input {
    display: inline-block;
    width: auto;
    /*min-width: 50px;*/
    max-width: 100%;
    box-sizing: content-box;
}
.form-control,
.form-select {
    border: none; /* Remove all borders */
    border-bottom: 2px solid var(--primary-medium);
    border-radius: 0; /* Remove rounded corners */
    background-color: transparent; /* Optional: transparent background */
    box-shadow: none; /* Remove shadow */
    transition: border-color 0.3s ease;
    font-size: 1rem; /* Adjust size for mobile readability */
    padding-left: 0; /* Align to left edge */
    padding-right: 0;
}

    /* On focus */
    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-dark);
        box-shadow: none;
        outline: none;
    }

    /* Optional: hover effect */
    .form-control:hover,
    .form-select:hover {
        border-color: var(--primary-light);
    }

.form-group.d-flex label.form-label {
    margin-bottom: 0; /* Remove bottom gap */
    margin-right: 8px; /* Space between label and input */
    display: flex;
    align-items: center; /* Vertical center alignment */
    white-space: nowrap; /* Prevent label from breaking */
}

.form-group.d-flex .form-control {
    height: auto;
    padding: 0.25rem 0; /* Smaller padding for vertical alignment */
    line-height: 1.2; /* Align text nicely */
    align-self: center; /* Center input in flex row */
}

.form-horizontal-group {
    display: flex;
    align-items: center;
    gap: 10px; /* space between label and input */
}

    .form-horizontal-group label {
        margin-bottom: 0;
        white-space: nowrap; /* keep label in one line */
    }

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: #fff;
}


/* File input */
input[type="file"].form-control {
    padding: 0.35rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(78, 38, 131, 0.25);
    transition: all 0.2s ease-in-out;
}

    .btn-primary:hover {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        box-shadow: 0 6px 16px rgba(78, 38, 131, 0.35);
    }
.btn-secondary {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(78, 38, 131, 0.25);
    transition: all 0.2s ease-in-out;
}
    .btn-secondary:hover {
        background-color: var(--text-dark) !important;
        border-color: var(--text-dark) !important;
        box-shadow: 0 6px 16px rgba(78, 38, 131, 0.35);
    }
/* Link to add fields */
.add-custom-field-link {
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

    .add-custom-field-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Modal refinements */
.modal-content {
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.image-upload-box .upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 140px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 2px dashed #d3d3d3;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

    .image-upload-box .upload-box:hover {
        background-color: #f0eaff;
        border-color: #7b4cb4;
    }
.editable-label {
    cursor: text;
    border-bottom: 1px dashed var(--primary-color);
    ;
    transition: border-color 0.2s;
}

    .editable-label:focus {
        outline: none;
        border-bottom: 1px solid var(--primary-color); /* Purple highlight on edit */
    }
.bg-primary {
    background-color: var(--primary-color) !important;
}
.text-primary {
    color: var(--primary-color) !important;
}
.bg-form-title {
    background: linear-gradient(135deg, var(--primary-color), var(--light-navy));
    box-shadow: 0 4px 15px rgba(78,84,200,0.4);
}
.cursor-pointer {
    cursor: pointer;
}