/**
 * P4U VT Customer Portal Public Styles
 */

/* General Styles */
.p4u-vt-portal-login,
.p4u-vt-portal-dashboard,
.p4u-vt-portal-view-data,
.p4u-vt-portal-edit-data,
.p4u-vt-portal-create-record {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Messages */
.p4u-vt-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.p4u-vt-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.p4u-vt-info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Login Form */
.p4u-vt-portal-login form {
    max-width: 500px;
    margin: 0 auto;
}

.p4u-vt-form-field {
    margin-bottom: 20px;
}

.p4u-vt-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.p4u-vt-form-field input[type="text"],
.p4u-vt-form-field input[type="email"],
.p4u-vt-form-field input[type="password"],
.p4u-vt-form-field input[type="tel"],
.p4u-vt-form-field input[type="url"],
.p4u-vt-form-field input[type="number"],
.p4u-vt-form-field input[type="date"],
.p4u-vt-form-field input[type="datetime-local"],
.p4u-vt-form-field select,
.p4u-vt-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.p4u-vt-form-field select[multiple] {
    height: auto;
    min-height: 100px;
}

/* Locaties dropdown specific styles */
.locaties-dropdown {
    pointer-events: auto !important;
    z-index: 1000 !important;
    position: relative !important;
    background: white !important;
    cursor: pointer !important;
}

.p4u-vt-form-field .required {
    color: #dc3232;
}

.p4u-vt-form-submit {
    margin-top: 20px;
}

.p4u-vt-form-submit button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.p4u-vt-form-submit button:hover {
    background-color: #005f8b;
}

/* Dashboard */
.p4u-vt-user-welcome {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.p4u-vt-dashboard-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.p4u-vt-dashboard-card {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.p4u-vt-dashboard-card h3 {
    margin-top: 0;
    color: #0073aa;
}

.p4u-vt-logout {
    margin-top: 30px;
    text-align: right;
}

/* Colorful Module Buttons */
.p4u-vt-portal-view-data h2 {
    text-align: center;
    margin-bottom: 20px; /* Optional: adds some space below the heading */
}

.p4u-vt-module-buttons-container {
    margin-bottom: 30px;
}

.p4u-vt-module-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 25px; /* Increased gap for larger buttons */
    padding: 0;
    margin: 0 0 30px 0;
    justify-content: center;
}

.p4u-vt-module-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px; /* Increased min-width */
    padding: 20px 30px; /* Increased padding for larger size */
    border-radius: 15px; /* Slightly less rounded for a more solid button feel */
    text-decoration: none;
    color: white;
    font-weight: 700; /* Bolder font */
    font-size: 18px; /* Larger font size */
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow */
    position: relative;
    overflow: hidden;
    text-align: center;
    flex-grow: 1; /* Allow buttons to grow and fill space if needed */
    max-width: 300px; /* Max width to prevent them from becoming too wide */
}

.p4u-vt-module-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.4s ease-out;
}

.p4u-vt-module-button:hover:before {
    transform: translateX(0);
}

.p4u-vt-module-button.active {
    background-color: #2c3e50;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.p4u-vt-module-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.p4u-vt-module-button-icon .dashicons {
    color: white;
    font-size: 26px; /* Larger icon size */
    width: 26px;
    height: 26px;
    opacity: 0.9;
}

.p4u-vt-module-button-text {
    position: relative;
}

/* Add a slight pulsing effect to the active button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.p4u-vt-module-button.active {
    animation: pulse 2s infinite;
}

/* Keep old module tabs styles for backward compatibility */
.p4u-vt-module-selector {
    margin-bottom: 30px;
}

.p4u-vt-module-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #ddd;
}

.p4u-vt-module-tabs li {
    margin: 0;
    margin-right: 5px;
    margin-bottom: -1px;
}

.p4u-vt-module-tabs li a {
    display: block;
    padding: 10px 15px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-bottom-color: transparent;
    border-radius: 4px 4px 0 0;
    text-decoration: none;
    color: #444;
}

.p4u-vt-module-tabs li.active a {
    background-color: #fff;
    border-bottom-color: #fff;
    color: #0073aa;
}

/* Records Display */
.p4u-vt-records {
    margin-bottom: 30px;
}

.p4u-vt-record {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.p4u-vt-record-table {
    width: 100%;
    border-collapse: collapse;
}

.p4u-vt-record-table th,
.p4u-vt-record-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.p4u-vt-record-table th {
    width: 200px;
    font-weight: bold;
    color: #666;
}

/* Navigation */
.p4u-vt-back-to-dashboard {
    margin-top: 30px;
}

/* Section Header Styles (to match module buttons) */
.p4u-vt-section-header {
    grid-column: 1 / -1; /* Span all columns in a grid layout */
    background-color: #0DA0DE !important; /* Active button color with !important */
    color: white;
    font-size: 18px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Keep existing shadow or adjust if needed */
    text-align: center;
    margin-top: 25px; /* Space above the header */
    margin-bottom: 20px; /* Space below the header */
    animation: pulse 2s infinite; /* Pulse animation from active button */
}

.p4u-vt-record-grid > .p4u-vt-section-header:first-child {
    margin-top: 0; /* Remove top margin if it's the first child in the grid */
}

/* Person Name Header Styling */
.p4u-vt-person-header {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    padding: 15px 20px;
    margin-bottom: 25px;
    position: relative;
    border-bottom: 2px solid #eaeaea;
    text-transform: capitalize;
}

/* Add a subtle decorative element under the name */
.p4u-vt-person-header:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background-color: #3498db;
}

/* Interactive Contacts Module Styles */
.p4u-vt-contacts-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.p4u-vt-list-title {
    font-size: 26px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}
.p4u-vt-list-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #3498db;
}
.p4u-vt-contact-item {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid #3498db;
    position: relative;
}
.p4u-vt-contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
    border-left-width: 8px;
}
.p4u-vt-contact-number {
    font-weight: 600;
    color: #3498db;
    font-size: 1.1em;
    margin-bottom: 5px;
}
.p4u-vt-contact-name {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 500;
}
.p4u-vt-contact-status {
    display: inline-block;
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 10px;
}
.p4u-vt-contact-expand {
    text-align: right;
    color: #3498db;
    font-weight: 600;
    font-size: 0.9em;
    display: inline-block;
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 5px 12px;
    border-radius: 20px;
    background-color: rgba(52, 152, 219, 0.1);
    transition: all 0.2s ease;
}
.p4u-vt-contact-item:hover .p4u-vt-contact-expand {
    background-color: rgba(52, 152, 219, 0.2);
}
.p4u-vt-record-back {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.2s ease;
    background-color: rgba(52, 152, 219, 0.1);
}
.p4u-vt-record-back:hover {
    background-color: rgba(52, 152, 219, 0.2);
    transform: translateX(-5px);
}
.p4u-vt-contacts-details .p4u-vt-record {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease-out;
}
@keyframes fadeInUp {
    from {opacity: 0;transform: translateY(20px);}
    to {opacity: 1;transform: translateY(0);}
}

/* Field Item Styles with Hover Effect */
.p4u-vt-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
    gap: 25px; /* Increased gap */
}

.p4u-vt-field-item {
    background-color: #ffffff; /* White background for field items */
    border: 1px solid #e9ecef; /* Lighter border */
    border-radius: 10px; /* More rounded */
    padding: 20px;
   /* box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);  Subtle shadow for depth */
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.p4u-vt-field-item:hover {
    transform: translateY(-5px); /* Lift effect */
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1); /* Enhanced shadow for more depth */
}

.p4u-vt-field-label {
    font-weight: 600;
    color: #495057; /* Darker grey for labels */
    margin-bottom: 8px;
    font-size: 0.95em; /* Slightly larger label */
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

.p4u-vt-field-value {
    color: #212529; /* Standard dark text for values */
    font-size: 1.05em; /* Slightly larger value text */
    line-height: 1.6;
}

/* Responsive adjustments for the grid within data display */
@media screen and (max-width: 992px) { 
    .p4u-vt-record-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    }
}

@media screen and (max-width: 576px) { 
    .p4u-vt-record-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
    .p4u-vt-section-header {
        font-size: 1.4em;
    }
    .p4u-vt-field-item {
        padding: 15px;
    }
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .p4u-vt-dashboard-menu {
        flex-direction: column;
    }
    
    .p4u-vt-module-tabs {
        flex-direction: column;
    }
    
    .p4u-vt-module-tabs li {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .p4u-vt-module-tabs li a {
        border-radius: 4px;
    }
    
    .p4u-vt-record-table th {
        width: 120px;
    }
}

/* Forgot Password Styles */
.p4u-vt-forgot-password-link {
    text-align: center;
    margin-top: 15px;
}

.p4u-vt-forgot-password-link a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.p4u-vt-forgot-password-link a:hover {
    text-decoration: underline;
}

.p4u-vt-forgot-password-form {
    max-width: 500px;
    margin: 20px auto 0;
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    animation: slideDown 0.3s ease-out;
}

.p4u-vt-forgot-password-form .p4u-vt-form-field {
    margin-bottom: 20px;
}

.p4u-vt-forgot-password-form .p4u-vt-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.p4u-vt-forgot-password-form .p4u-vt-form-field input[type="email"],
.p4u-vt-email-input {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 40px !important;
}

.p4u-vt-forgot-password-form h3 {
    margin-top: 0;
    color: #0073aa;
    text-align: center;
}

.p4u-vt-forgot-password-form p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.p4u-vt-forgot-password-form .p4u-vt-form-submit {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.p4u-vt-forgot-password-form .p4u-vt-form-submit button {
    flex: 0 0 auto;
}

#p4u-vt-forgot-password-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

#p4u-vt-forgot-password-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#p4u-vt-forgot-password-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

#p4u-vt-forgot-password-submit.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide login form when forgot password is shown */
.p4u-vt-portal-login.forgot-password-mode > form:first-of-type {
    display: none;
}

/* Ensure forgot password form is visible when shown */
.p4u-vt-forgot-password-form.show {
    display: block !important;
}
