/* Complementary styles for PLGS form (Bootstrap base) */
.input-group-text i { color: #6db6fd; }
.invalid-feedback { display: block; }
.plgs-step { transition: opacity .12s ease; }

.plgs-form {
    font-family: "Arial";
}
.plgs-form .input-group-text i {
    color: #6db6fd;
}
.plgs-form h1, .plgs-form h2, .plgs-form h3, .plgs-form h4, .plgs-form h5, .plgs-form h6 {
    text-align: center;
}
.plgs-form h1 {
    font-size: 2.5rem;
    font-weight: bold;
}
.plgs-form h2 {
    font-size: 2rem;
    font-weight: bold;
}
.plgs-form h3 {
    font-size: 1.75rem;
    font-weight: bold;
}
.plgs-form h4 {
    font-size: 1.5rem;
    font-weight: bold;
}

#plgs-contact-form a {
    color: #f2a100;
}

.plgs-form .card {
    border: none;
}

/* Increase checkboxes and radio buttons sizes */
.plgs-form input[type=checkbox], .plgs-form input[type=radio]
{
    -ms-transform: scale(1.5); /* IE */
    -moz-transform: scale(1.5); /* FF */
    -webkit-transform: scale(1.5); /* Safari and Chrome */
    -o-transform: scale(1.5); /* Opera */
    padding: 10px;
}
/* And give them some space */
.plgs-form .form-check
{
    margin-bottom: 0.7rem;
    margin-left: 1rem;
}
.plgs-form label.form-check-label
{
    margin-left: 0.3rem;
}

/* Signature */
canvas {
    touch-action: none;
}
#plgs-signature-canvas {
    background-color: white;
}
/* Apply invalid BootStrap style to signature canvas */
#plgs-signature-canvas.is-invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Clickable File Uploader */
.plgs-file-uploader {
    min-height: 140px;
}
.plgs-file-placeholder {
    border: 2px dashed rgba(0, 0 ,0, 0.125);
    border-radius: 6px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    transition: background .12s ease, border-color .12s ease;
    cursor: pointer;
    display: block;
    height: 200px;
    /* Ensure placeholder positioning for absolute children */
    position: relative;
    overflow: hidden;
}
.plgs-file-placeholder:hover,
.plgs-file-placeholder:focus,
#plgs-contact-form .plgs-file-placeholder {
    background: #f8f9fb;
    border-color: #bcd9ff;
    text-decoration: none;
}
.plgs-file-placeholder > i {
    color: #6db6fd;
    font-size: 36px;
}
/* State when a file has been selected */
.plgs-file-placeholder.plgs-file-selected {
    background: #f1fbff;
    border-color: #6db6fd;
}
/* Thumb inside placeholder */
.plgs-file-placeholder .plgs-file-thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    z-index: 1;
    border-radius: 6px;
}
/* Icon/text of empty placeholder (over thumb) */
.plgs-file-placeholder > i,
.plgs-file-placeholder > div,
.plgs-file-placeholder > small {
    position: relative;
    z-index: 2;
}
/* Filename */
.plgs-file-placeholder .plgs-file-name {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(255,255,255,0.85);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .9rem;
    color: #222;
    max-width: calc(100% - 56px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Remove button */
.plgs-file-placeholder .plgs-file-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 16px;
    text-align: center;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    transition: background .12s ease, transform .08s ease;
    cursor: pointer;
    display: inline-flex;
}
.plgs-file-placeholder .plgs-file-remove i {
    font-size: 14px;
    color: #fff;
    line-height: 1;
}
.plgs-file-placeholder .plgs-file-remove:hover,
.plgs-file-placeholder .plgs-file-remove:focus {
    background: rgba(0,0,0,0.72);
    transform: translateY(-1px);
    outline: none;
}
/* State with selected file: hide icon/text and show thumb+filename+removeBtn */
.plgs-file-placeholder.plgs-file-selected > i,
.plgs-file-placeholder.plgs-file-selected > div,
.plgs-file-placeholder.plgs-file-selected > small {
    display: none;
}
.plgs-file-placeholder.plgs-file-selected .plgs-file-thumb { display: block; }
.plgs-file-placeholder.plgs-file-selected .plgs-file-name { display: block; }
.plgs-file-placeholder.plgs-file-selected .plgs-file-remove { display: inline-flex; }

/* Adjust checkboxes and radio buttons based on viewport */
.plgs-form .form-check-grid {
    display: grid;
}
.form-check-inline {
    display: inline-flex;
    align-items: center;
    padding-left: 0;
    margin-right: 0;
}
/* Extra large screens: 5 columns */
@media (min-width: 1440px) {
    .plgs-form .form-check-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
/* Large screens: 4 columns */
@media (min-width: 1200px) {
    .plgs-form .form-check-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* Large tablets: 3 columns */
@media (min-width: 992px) and (max-width: 1199px) {
    .plgs-form .form-check-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Tablets: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .plgs-form .form-check-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Mobile: 1 column */
@media (max-width: 767px) {
    .plgs-form .form-check-grid {
        grid-template-columns: 1fr;
    }
}