/* Trooper CRM Glassmorphism Styles */
:root {
    --tcrm-glass-bg: rgba(255, 255, 255, 0.75);
    --tcrm-glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --tcrm-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --tcrm-primary: #2271b1;
    --tcrm-text: #2c3e50;
    --tcrm-text-light: #5f6c7b;
}

/* Animations */
@keyframes tcrmFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Container - The Glass Pane */
.tcrm-frontend-form,
.tcrm-directory-container {
    background: var(--tcrm-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: var(--tcrm-glass-border);
    box-shadow: var(--tcrm-glass-shadow);
    max-width: 900px;
    /* Default for directory */
    margin: 40px auto;
    padding: 50px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--tcrm-text);
    animation: tcrmFadeIn 0.8s ease-out;
}

/* Typography */
.tcrm-frontend-form h2,
.tcrm-directory-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 35px;
    color: var(--tcrm-text);
    text-align: center;
    border-bottom: none;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* FORM GRID */
.tcrm-frontend-form {
    max-width: 600px;
    /* Centralized Form */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.tcrm-row {
    display: block;
    margin-bottom: 20px;
}

.tcrm-col {
    position: relative;
    width: 100%;
}

.tcrm-col label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--tcrm-text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-left: 4px;
}

/* Inputs - Inner Glass */
.tcrm-col input,
.tcrm-col select,
.tcrm-directory-container input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 15px;
    color: var(--tcrm-text);
    background: rgba(255, 255, 255, 0.5);
    /* Semi-transparent input bg */
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Focus State */
.tcrm-col input:focus,
.tcrm-col select:focus,
.tcrm-directory-container input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--tcrm-primary);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    outline: none;
    transform: translateY(-1px);
}

/* Select Styling */
.tcrm-col select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235f6c7b' stroke-width='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 15px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Wizard Elements */
.tcrm-wizard-container {
    margin-bottom: 30px;
}

.tcrm-progress-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 50px;
    padding: 0 15px;
}

.tcrm-progress-bar-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 0;
    transform: translateY(-50%);
}

.tcrm-prog-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(0, 0, 0, 0.05);
    color: var(--tcrm-text-light);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.tcrm-prog-step.active .tcrm-prog-circle {
    background: var(--tcrm-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(34, 113, 177, 0.3);
    border-color: var(--tcrm-primary);
}

.tcrm-step-title {
    color: var(--tcrm-text-light);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    opacity: 0.8;
}

/* Buttons */
.tcrm-btn-next,
.tcrm-frontend-form input[type="submit"] {
    background: linear-gradient(135deg, #2271b1 0%, #175e96 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(34, 113, 177, 0.25);
    transition: all 0.3s ease;
}

.tcrm-btn-next:hover,
.tcrm-frontend-form input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(34, 113, 177, 0.35);
}

.tcrm-btn-prev {
    background: transparent;
    color: var(--tcrm-text-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tcrm-btn-prev:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--tcrm-text);
}

/* Submit Button Placement */
.tcrm-frontend-form input[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 20px;
}

.tcrm-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

/* Mobile */
@media(max-width: 600px) {

    .tcrm-frontend-form,
    .tcrm-directory-container {
        padding: 25px;
    }

    .tcrm-frontend-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Validation Shake */
@keyframes tcrmShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

.tcrm-shake {
    animation: tcrmShake 0.4s ease-in-out;
}

/* Messages */
.tcrm-success-msg,
.tcrm-error-msg {
    grid-column: 1 / -1;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.tcrm-success-msg {
    background: rgba(232, 245, 233, 0.8);
    color: #1b5e20;
    border: 1px solid rgba(27, 94, 32, 0.1);
}

.tcrm-error-msg {
    background: rgba(255, 235, 238, 0.8);
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.1);
}

/* Directory Table */
.tcrm-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.4);
}

.tcrm-front-table th {
    background: rgba(0, 0, 0, 0.02);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--tcrm-text-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tcrm-front-table tr:hover td {
    background: rgba(255, 255, 255, 0.6);
}

.tcrm-directory-container input[type="text"] {
    padding-left: 20px;
    /* Reset padding since search icon is gone */
    background: rgba(255, 255, 255, 0.6);
}