/**
 * Team Admin Styles
 */

/* Hide WordPress default page title */
.page-template-default .entry-title,
body.page .hentry .entry-title {
    display: none !important;
}

.ak-team-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.ak-team-header {
    text-align: center;
    margin-bottom: 40px;
}

.ak-team-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #1e3a5f;
}

.ak-team-header > p {
    margin: 0 0 25px 0;
    color: #666;
}

/* Stats */
.ak-team-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ak-stat-box {
    background: linear-gradient(135deg, #f8fafb 0%, #e8f4f8 100%);
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
}

.ak-stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ak-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Invite Section */
.ak-invite-section {
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.ak-invite-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1e3a5f;
}

.ak-invite-form .ak-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.ak-invite-form .ak-form-group {
    margin-bottom: 0;
}

.ak-invite-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.ak-invite-form input,
.ak-invite-form select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e7ef;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
}

.ak-invite-form input:focus,
.ak-invite-form select:focus {
    outline: none;
    border-color: #2d5a87;
}

.ak-invite-note {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.ak-invite-btn {
    padding: 14px 30px;
    background: linear-gradient(135deg, #28a745 0%, #20963c 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ak-invite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

#ak-invite-result {
    margin-top: 15px;
}

/* Team Full Message */
.ak-team-full {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.ak-team-full p {
    margin: 0 0 10px 0;
    color: #856404;
}

.ak-upgrade-link {
    color: #1e3a5f;
    font-weight: 600;
}

/* Team List */
.ak-team-list-section {
    margin-bottom: 30px;
}

.ak-team-list-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1e3a5f;
}

.ak-no-members {
    background: #f8fafb;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #888;
}

.ak-team-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Member Card */
.ak-member-card {
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ak-member-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
}

.ak-member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
}

.ak-member-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ak-member-name {
    font-weight: 600;
    color: #1e3a5f;
}

.ak-member-email {
    font-size: 13px;
    color: #888;
}

.ak-status-active {
    font-size: 11px;
    color: #28a745;
    font-weight: 600;
}

.ak-status-pending {
    font-size: 11px;
    color: #ff9800;
    font-weight: 600;
}

/* Credit Allocation */
.ak-member-credits {
    display: flex;
    gap: 15px;
}

.ak-credit-allocation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ak-credit-allocation label {
    font-size: 12px;
    color: #888;
}

.ak-allocation-select {
    padding: 8px 12px;
    border: 1px solid #e0e7ef;
    border-radius: 6px;
    font-size: 13px;
}

/* Member Actions */
.ak-member-actions {
    display: flex;
    gap: 10px;
}

.ak-remove-member {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.ak-remove-member:hover {
    background: #dc3545;
    color: #fff;
}

/* Member View */
.ak-member-allocation-view {
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.ak-member-allocation-view h2 {
    margin: 0 0 25px 0;
    color: #1e3a5f;
}

.ak-allocation-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ak-alloc-card {
    background: linear-gradient(135deg, #f8fafb 0%, #e8f4f8 100%);
    padding: 25px 35px;
    border-radius: 12px;
    text-align: center;
}

.ak-alloc-icon {
    display: block;
    font-size: 30px;
    margin-bottom: 10px;
}

.ak-alloc-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #1e3a5f;
}

.ak-alloc-label {
    display: block;
    font-size: 13px;
    color: #888;
}

.ak-allocation-note {
    color: #888;
    font-size: 14px;
}

/* Upgrade Prompt */
.ak-upgrade-prompt {
    text-align: center;
    padding: 40px 20px;
}

.ak-upgrade-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.ak-upgrade-prompt h2 {
    margin: 0 0 10px 0;
    color: #1e3a5f;
}

.ak-upgrade-prompt > p {
    margin: 0 0 30px 0;
    color: #666;
}

.ak-plan-comparison {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ak-plan-option {
    background: #fff;
    border: 2px solid #e0e7ef;
    border-radius: 12px;
    padding: 25px;
    min-width: 200px;
    position: relative;
}

.ak-plan-option.ak-recommended {
    border-color: #28a745;
}

.ak-rec-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.ak-plan-option h3 {
    margin: 0 0 5px 0;
    color: #1e3a5f;
}

.ak-plan-option p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #888;
}

.ak-plan-price {
    font-size: 28px;
    font-weight: 800;
    color: #27ae60;
    display: block;
    margin-bottom: 15px;
}

.ak-plan-price small {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.ak-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.ak-plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #555;
}

.ak-plan-features li::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
    margin-right: 10px;
}

.ak-plan-btn {
    display: block;
    width: 100%;
    padding: 15px 25px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.ak-plan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,204,0.4);
}

.ak-btn-enterprise {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
}

.ak-btn-enterprise:hover {
    box-shadow: 0 6px 20px rgba(39,174,96,0.4);
}

/* Upgrade Prompt Header with Helper */
.ak-upgrade-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border-radius: 16px;
    color: white;
}

.ak-upgrade-header .ak-helper-image {
    width: 80px;
    height: 80px;
    background: url('https://appointmentkeeper.co.uk/wp-content/uploads/2026/03/4th-Noir-Storys-Busness-and-Work.fw_.png');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.ak-upgrade-text h2 {
    margin: 0 0 5px 0;
    color: white;
}

.ak-upgrade-text p {
    margin: 0;
    opacity: 0.9;
    color: white;
}

.ak-upgrade-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #28a745 0%, #20963c 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.ak-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    color: #fff;
}

/* Footer */
.ak-team-footer {
    text-align: center;
    margin-top: 30px;
}

.ak-back-link {
    color: #2d5a87;
    text-decoration: none;
    font-weight: 500;
}

/* Notice */
.ak-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/* Messages */
.ak-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
}

.ak-message.success {
    background: #d4edda;
    color: #155724;
}

.ak-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 600px) {
    .ak-team-page {
        padding: 25px 15px;
    }
    
    .ak-team-header h1 {
        font-size: 26px;
    }
    
    .ak-team-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .ak-invite-form .ak-form-row {
        grid-template-columns: 1fr;
    }
    
    .ak-member-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ak-member-credits {
        width: 100%;
        justify-content: space-between;
    }
    
    .ak-plan-comparison {
        flex-direction: column;
        align-items: center;
    }
}
