/* Custom User Profile Styles - Professional Card Look */

/* --- General Body and Page Wrapper Styles --- */
body {
    background-color: #f5edcb; /* Newspaper tone background for the whole body */
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif; /* Example font, adjust if needed */
    color: #000; /* Default text color for the entire page */
    line-height: 1.6;
}

.cup-profile-page-wrapper {
    /* This outer wrapper provides overall page spacing and structure */
    padding: 20px; /* Some padding around the main container */
    box-sizing: border-box;
    min-height: 80vh; /* Ensure it takes up enough vertical space */
    display: flex; /* Use flexbox to center content */
    justify-content: center;
    align-items: flex-start; /* Align to the top of the flex container */
}

/* --- Main Profile Card Container --- */
.cup-profile-container {
    max-width: 850px; /* Adjusted max width for the card, can be customized */
    width: 100%; /* Ensure it takes full width up to max-width */
    margin: 0 auto; /* Centered horizontally */
    background-color: #ffffff; /* Clean white background for the card */
    border-radius: 15px; /* More rounded corners for a modern card look */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* Softer, deeper shadow */
    padding: 40px; /* Ample padding inside the card */
    box-sizing: border-box; /* Include padding in width/height calculation */
    overflow: hidden; /* Contains floats and rounded corners */
    border: 1px solid #e0e0e0; /* Subtle light grey border */
}

/* --- Profile Header Section --- */
.cup-profile-header {
    text-align: center;
    padding-bottom: 30px; /* Space below header content */
    border-bottom: 1px solid #eeeeee; /* Subtle separator line */
    margin-bottom: 35px; /* Space above the details section */
}

/* Avatar Styling */
.cup-avatar {
    width: 150px; /* Larger avatar */
    height: 150px;
    border-radius: 50%; /* Perfect circle */
    object-fit: cover; /* Ensures image covers the area without distortion */
    margin: 0 auto 20px; /* Centered, with good space below */
    border: 6px solid #ccc; /* Thicker light grey border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Prominent shadow for avatar */
    display: block; /* Ensures margin:auto works for centering */
}

/* Header Content (Name, Status, Bio) */
.cup-header-content {
    /* Add flex here to manage name and status separately */
    display: flex;
    flex-direction: column; /* Stack name, status, bio vertically */
    align-items: center; /* Center items horizontally */
    width: 100%; /* Ensure it takes full width */
}

/* Display Name and Verified Icon */
.cup-display-name {
    font-size: 3em; /* Very large font size for display name */
    font-weight: 800; /* Extra bold for emphasis */
    margin: 0 0 12px; /* Adjust margin */
    display: inline-flex; /* Use inline-flex to keep it inline but allow flex properties */
    align-items: center; /* Vertically align items in the center */
    flex-wrap: wrap; /* Allow items to wrap to the next line if space is limited */
    justify-content: center; /* Center content horizontally if it wraps */
    gap: 15px; /* Increased space between name and icon */
    color: #000000; /* Ensure name is black */
    line-height: 1.1; /* Tighter line spacing */
    max-width: 100%; /* Ensure it doesn't overflow its parent */
    text-align: center; /* Center the text itself within the flex container */
}

.cup-name-text {
    display: inline-block; /* Allows the span to wrap if the name is too long */
    white-space: normal; /* Allow text wrapping */
}

.cup-verified-icon {
    width: 35px; /* Slightly larger for more prominence */
    height: 35px;
    vertical-align: middle; /* Align icon with text baseline */
    flex-shrink: 0; /* Prevents icon from shrinking on smaller screens */
    margin-bottom: -5px; /* Adjust if needed to align perfectly with text baseline */
}

/* Status Badge Styling */
.cup-status {
    font-size: 1.2em; /* Larger for better readability and impact */
    font-weight: bold;
    padding: 10px 25px; /* More padding for a substantial badge */
    border-radius: 30px; /* Very rounded, pill-shaped */
    display: inline-block; /* Allows text to center within its own box */
    color: #ffffff; /* White text for status */
    margin-top: 18px; /* Space above status */
    text-transform: uppercase; /* Capitalize for strong visual impact */
    letter-spacing: 1px; /* Slightly wider letter spacing */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); /* Subtle shadow for the badge */
    /* Removed absolute positioning to keep it inline with flex-direction: column */
}

/* Specific Status Colors */
.cup-status.active { background-color: #28a745; /* Green */ }
.cup-status.inactive { background-color: #6c757d; /* Muted Grey */ }
.cup-status.suspended { background-color: #dc3545; /* Red */ }
.cup-status.terminated { background-color: #343a40; /* Darker Black/Grey */ }
.cup-status.processing { background-color: #ffc107; /* Amber/Orange */ }
.cup-status.default-status { background-color: #808080; /* Default grey if status not selected */ }

/* Biographical Info */
.cup-bio {
    font-size: 1.1em;
    color: #555555; /* Softer black for readability */
    margin-top: 25px; /* More space above bio */
    line-height: 1.8; /* Improved line height for long text */
    max-width: 700px; /* Limit width for better readability of long text */
    margin-left: auto; /* Center bio text block */
    margin-right: auto;
}

/* --- Profile Details Section --- */
.cup-profile-details {
    margin-bottom: 40px; /* Space below details section */
    padding-top: 10px; /* Small top padding */
}

.cup-profile-details p {
    margin-bottom: 16px; /* More space between detail lines */
    line-height: 1.7;
    color: #333333; /* Slightly softer black for readability */
    display: flex; /* Use flexbox for aligned key-value pairs */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    align-items: baseline; /* Align text baselines */
}

.cup-profile-details strong {
    flex-basis: 180px; /* Fixed width for labels on larger screens */
    flex-shrink: 0; /* Prevent label from shrinking */
    margin-right: 25px; /* Increased space between label and value */
    color: #000000; /* Ensure label is black */
    font-weight: 700; /* Bold labels */
}

/* Star Rating Icons */
.cup-star-filled {
    color: #ffc107; /* Gold color for filled stars */
    font-size: 1.5em; /* Larger stars for better visibility */
}
.cup-star-empty {
    color: #cccccc; /* Lighter grey for empty stars */
    font-size: 1.5em;
}
.cup-profile-details p .dashicons {
    vertical-align: middle; /* Align icons with text */
    margin-right: 3px; /* Small space between stars */
}

/* --- New: Redirect Button Styling --- */
.cup-button-wrapper {
    text-align: center; /* Center the button */
    margin-top: 30px; /* Space above the button */
    padding-top: 20px; /* Padding above the button inside the details section */
    border-top: 1px solid #eeeeee; /* Separator line above the button */
}

.cup-redirect-button {
    display: inline-block; /* Allows padding and alignment */
    background-color: #0d47a1; /* A strong blue color, adjust as needed */
    color: #ffffff; /* White text */
    padding: 15px 30px; /* Generous padding */
    border-radius: 8px; /* Slightly rounded corners */
    text-decoration: none; /* No underline */
    font-size: 1.2em; /* Readable font size */
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effects */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.cup-redirect-button:hover {
    background-color: #0a3a80; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

/* --- User Posts Section --- */
.cup-user-posts {
    border-top: 1px solid #eeeeee; /* Separator for posts section */
    padding-top: 35px; /* More padding above posts */
}

.cup-user-posts h3 {
    font-size: 2em; /* Larger heading for posts section */
    font-weight: 700;
    margin-bottom: 30px; /* More space below heading */
    color: #000000; /* Ensure heading is black */
    text-align: center; /* Center align heading */
}

.cup-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid with slightly larger min-width */
    gap: 30px; /* Increased gap between posts */
}

.cup-post-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* More rounded */
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Clearer shadow */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Smoother transition */
}

.cup-post-item:hover {
    transform: translateY(-10px); /* More pronounced lift on hover */
    box-shadow: 0 12px 25px rgba(0,0,0,0.2); /* Stronger shadow on hover */
}

.cup-post-item a {
    text-decoration: none; /* No underline for link */
    color: inherit; /* Inherit text color */
    display: block; /* Make the whole item clickable */
}

.cup-post-item img.cup-post-thumbnail,
.cup-post-item img.cup-post-thumbnail-placeholder {
    width: 100%;
    height: 220px; /* Consistent height for all post images */
    object-fit: cover; /* Cover the area, cropping if necessary */
    display: block;
    border-bottom: 1px solid #eee; /* Separator below image */
}

.cup-post-item h4 {
    font-size: 1.35em; /* Larger and bolder post title */
    font-weight: 700;
    padding: 18px; /* More padding for title */
    color: #000000; /* Post title black */
    margin: 0;
    line-height: 1.3;
}

.cup-post-item .cup-post-date {
    font-size: 0.95em;
    color: #666666;
    padding: 0 18px 18px; /* More padding for date */
    display: block;
}

.cup-no-posts-found {
    text-align: center;
    font-size: 1.2em;
    color: #555;
    margin-top: 40px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .cup-profile-container {
        max-width: 750px;
        padding: 35px;
    }
    .cup-display-name {
        font-size: 2.5em;
    }
    .cup-verified-icon {
        width: 30px;
        height: 30px;
    }
    .cup-avatar {
        width: 130px;
        height: 130px;
    }
    .cup-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    .cup-post-item img {
        height: 180px;
    }
    .cup-redirect-button {
        font-size: 1.1em;
        padding: 12px 25px;
    }
}

@media (max-width: 768px) {
    .cup-profile-page-wrapper {
        padding: 15px;
    }
    .cup-profile-container {
        margin: 15px;
        padding: 25px;
        border-radius: 12px;
    }
    .cup-avatar {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }
    .cup-display-name {
        font-size: 2em;
        /* Re-adjusted to ensure wrapping if needed, but primarily centered */
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        text-align: center; /* Still center text within the line */
    }
    .cup-verified-icon {
        width: 26px;
        height: 26px;
    }
    .cup-status {
        font-size: 1.0em;
        padding: 8px 20px;
        border-radius: 25px;
        /* No specific changes needed here as flex-direction column handles its placement */
    }
    .cup-bio {
        font-size: 1em;
        margin-top: 20px;
    }
    .cup-profile-details p {
        flex-direction: column; /* Stack label and value vertically */
        align-items: flex-start; /* Align labels to the left */
        margin-bottom: 12px;
    }
    .cup-profile-details strong {
        margin-right: 0;
        margin-bottom: 4px;
        flex-basis: auto; /* Remove fixed width */
    }
    .cup-user-posts h3 {
        font-size: 1.6em;
        margin-bottom: 25px;
    }
    .cup-posts-grid {
        grid-template-columns: 1fr; /* Single column on small tablets/phones */
        gap: 20px;
    }
    .cup-post-item img {
        height: 200px;
    }
    .cup-post-item h4 {
        font-size: 1.2em;
        padding: 12px;
    }
    .cup-post-item .cup-post-date {
        padding: 0 12px 12px;
    }
    .cup-redirect-button {
        font-size: 1em;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .cup-profile-page-wrapper {
        padding: 8px;
    }
    .cup-profile-container {
        margin: 10px;
        padding: 18px;
        border-radius: 10px;
    }
    .cup-avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
    .cup-display-name {
        font-size: 1.6em;
        gap: 6px;
    }
    .cup-verified-icon {
        width: 22px;
        height: 22px;
    }
    .cup-status {
        font-size: 0.85em;
        padding: 6px 15px;
        border-radius: 20px;
    }
    .cup-profile-details p {
        font-size: 0.9em;
        margin-bottom: 10px;
    }
    .cup-profile-details strong {
        font-size: 0.95em;
    }
    .cup-star-filled, .cup-star-empty {
        font-size: 1.3em;
    }
    .cup-user-posts h3 {
        font-size: 1.4em;
    }
    .cup-post-item img {
        height: 160px;
    }
    .cup-post-item h4 {
        font-size: 1.1em;
        padding: 10px;
    }
    .cup-post-item .cup-post-date {
        padding: 0 10px 10px;
    }
    .cup-redirect-button {
        font-size: 0.9em;
        padding: 8px 18px;
    }
}