/* ==========================================================================
   Ain Prokash Smart Forms - Ultra-Premium, Modern & Responsive Stylesheet
   Designed specifically for Ain Prokash Legal Platform
   ========================================================================== */

/* Main Wrapper Card */
.ap-form-wrapper {
    max-width: 820px;
    margin: 35px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 38px 42px;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.07), 0 0 0 1px rgba(226, 232, 240, 0.7);
    font-family: 'Hind Siliguri', 'SolaimanLipi', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.ap-form-wrapper:hover {
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(203, 213, 225, 0.8);
}
.ap-smart-form * {
    box-sizing: border-box;
}

/* Top Accent Bars */
.ap-form-top-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 50%, #0d9488 100%);
}
.ap-accent-danger {
    background: linear-gradient(90deg, #dc2626 0%, #f43f5e 50%, #e11d48 100%) !important;
}
.ap-accent-warning {
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #b45309 100%) !important;
}
.ap-accent-info {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #1d4ed8 100%) !important;
}
.ap-accent-purple {
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 50%, #6d28d9 100%) !important;
}
.ap-accent-dark {
    background: linear-gradient(90deg, #0f172a 0%, #334155 50%, #1e293b 100%) !important;
}

/* Header Section */
.ap-form-header {
    text-align: left;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1.5px solid #f1f5f9;
}
.ap-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: #f0fdf4;
    color: #0f766e;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}
.ap-badge-danger {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}
.ap-badge-warning {
    background: #fffbeb !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}
.ap-badge-info {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-color: #bfdbfe !important;
}
.ap-badge-purple {
    background: #faf5ff !important;
    color: #7c3aed !important;
    border-color: #e9d5ff !important;
}
.ap-badge-dark {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.ap-form-title {
    margin: 4px 0 8px 0;
    font-size: 23px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -0.3px;
}
.ap-form-desc {
    margin: 0;
    font-size: 14.5px;
    color: #64748b;
    line-height: 1.6;
}

/* Grid & Layout Rows */
.ap-form-row {
    margin-bottom: 20px;
}
.ap-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 680px) {
    .ap-form-wrapper {
        padding: 28px 20px;
        margin: 20px auto;
        border-radius: 12px;
    }
    .ap-form-row-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ap-form-title {
        font-size: 20px;
    }
}

/* Form Groups & Labels */
.ap-form-group {
    display: flex;
    flex-direction: column;
}
.ap-form-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 7px;
    line-height: 1.4;
}
.ap-label-icon {
    font-size: 14px;
}
.ap-form-group .ap-required {
    color: #dc2626;
    font-weight: 800;
    margin-left: 2px;
}

/* Modern Input Controls */
.ap-form-group input[type="text"],
.ap-form-group input[type="email"],
.ap-form-group input[type="number"],
.ap-form-group textarea,
.ap-form-group select {
    width: 100%;
    min-height: 48px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14.5px;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.ap-form-group textarea {
    min-height: 110px;
    line-height: 1.6;
    resize: vertical;
}

/* Input Focus States */
.ap-form-group input:hover,
.ap-form-group textarea:hover,
.ap-form-group select:hover {
    border-color: #94a3b8;
    background: #ffffff;
}
.ap-form-group input:focus,
.ap-form-group textarea:focus,
.ap-form-group select:focus {
    border-color: #0f766e;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

/* Custom SVG Select Arrow */
.ap-form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    cursor: pointer;
}

/* Error States */
.ap-form-group input.ap-input-error,
.ap-form-group textarea.ap-input-error,
.ap-form-group select.ap-input-error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12) !important;
}

/* File Upload Dropzone */
.ap-file-box {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    padding: 16px 20px;
    text-align: left;
    transition: all 0.25s ease;
}
.ap-file-box:hover {
    border-color: #0f766e;
    background: #f0fdf4;
}
.ap-file-box input[type="file"] {
    display: block;
    width: 100%;
    font-size: 13.5px;
    color: #334155;
    cursor: pointer;
}
.ap-file-hint {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: #64748b;
}

/* Checkbox Card */
.ap-checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ap-checkbox-card:hover {
    border-color: #0f766e;
    background: #ffffff;
}
.ap-checkbox-card input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #0f766e;
    cursor: pointer;
}
.ap-checkbox-text {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.55;
}

/* Anonymous Tip Highlight Box */
.ap-anonymous-box {
    background: #f8fafc;
    padding: 18px;
    border-radius: 10px;
    border: 1.5px dashed #cbd5e1;
    margin-top: 5px;
}

/* Anti-Bot Captcha Security Widget */
.ap-captcha-row {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid #86efac;
    border-radius: 12px;
    padding: 18px 22px;
    margin-top: 22px;
}
.ap-captcha-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.ap-captcha-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ap-captcha-shield {
    font-size: 26px;
    line-height: 1;
}
.ap-captcha-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #14532d;
}
.ap-captcha-sub {
    font-size: 12.5px;
    color: #166534;
    margin-top: 2px;
}
.ap-captcha-control {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ap-captcha-badge {
    background: #0f766e;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}
.ap-captcha-equal {
    font-weight: 800;
    font-size: 18px;
    color: #14532d;
}
.ap-captcha-input {
    width: 90px !important;
    min-height: 44px !important;
    padding: 8px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-align: center !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    border-color: #86efac !important;
}
.ap-captcha-input:focus {
    border-color: #0f766e !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2) !important;
}

/* Submit Button & Actions */
.ap-form-submit-row {
    margin-top: 28px;
    text-align: center;
}
.ap-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    padding: 14px 38px;
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
}
.ap-form-btn:hover {
    background: linear-gradient(135deg, #115e59 0%, #134e4a 100%);
    box-shadow: 0 10px 25px rgba(15, 118, 110, 0.4);
    transform: translateY(-2px);
}
.ap-form-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}
.ap-form-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Specialized Button Color Variants */
.ap-btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.3) !important;
}
.ap-btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4) !important;
}
.ap-btn-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3) !important;
}
.ap-btn-dark:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4) !important;
}

/* Spinner Animation */
.ap-btn-spinner {
    display: inline-block;
    width: 17px;
    height: 17px;
    margin-left: 10px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: ap-spin 0.75s linear infinite;
}
@keyframes ap-spin {
    to { transform: rotate(360deg); }
}

/* Modern Notification Banners */
.ap-form-notice {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: ap-fadeIn 0.3s ease;
}
@keyframes ap-fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.ap-notice-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #a7f3d0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}
.ap-notice-error {
    background: #fff1f2;
    color: #9f1239;
    border: 1.5px solid #fecdd3;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.1);
}
