/**
 * Custom My Account Styles
 * WooCommerce My Account inspired design
 */

/* Form Elements (for Edit Profile) */
.cma-form {
    margin: 0;
}

.cma-form-group {
    margin-bottom: 20px;
}

.cma-form-row {
    display: flex;
    gap: 15px;
}

.cma-form-row .cma-form-group {
    flex: 1;
}

.cma-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.cma-form-group .required {
    color: #e2401c;
}

.cma-form-group input[type="text"],
.cma-form-group input[type="email"],
.cma-form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.cma-form-group input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.cma-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Buttons */
.cma-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.cma-button-primary {
    background-color: #2271b1;
    color: #fff;
}

.cma-button-primary:hover {
    background-color: #135e96;
    color: #fff;
}

.cma-button-secondary {
    background-color: #646970;
    color: #fff;
}

.cma-button-secondary:hover {
    background-color: #50575e;
    color: #fff;
}

/* Messages */
.cma-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.cma-form-message.cma-success {
    background-color: #00a32a;
    color: #fff;
    display: block;
}

.cma-form-message.cma-error {
    background-color: #d63638;
    color: #fff;
    display: block;
}

.cma-message {
    padding: 15px;
    margin: 20px 0;
    background: #f0f0f1;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.cma-error {
    padding: 15px;
    margin: 20px 0;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    color: #d63638;
}

/* My Account Styles - WooCommerce Inspired */
.cma-my-account {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.cma-my-account-header {
    margin-bottom: 30px;
}

.cma-my-account-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.cma-welcome {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.cma-my-account-content {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

/* Sidebar */
.cma-my-account-sidebar {
    flex: 0 0 250px;
}

.cma-account-navigation {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.cma-account-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cma-account-navigation li {
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
}

.cma-account-navigation li:last-child {
    border-bottom: none;
}

.cma-account-navigation li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.cma-account-navigation li a:hover {
    background-color: #f5f5f5;
    color: #2271b1;
}

.cma-account-navigation li.is-active a {
    background-color: #2271b1;
    color: #fff;
    font-weight: 500;
}

.cma-account-navigation li.is-active a:hover {
    background-color: #135e96;
}

/* WordPress Menu Support */
.cma-account-navigation ul.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cma-account-navigation .menu-item {
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
}

.cma-account-navigation .menu-item:last-child {
    border-bottom: none;
}

.cma-account-navigation .menu-item a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.cma-account-navigation .menu-item a:hover {
    background-color: #f5f5f5;
    color: #2271b1;
}

.cma-account-navigation .menu-item.is-active a,
.cma-account-navigation .menu-item.current-menu-item a {
    background-color: #2271b1;
    color: #fff;
    font-weight: 500;
}

.cma-account-navigation .menu-item.is-active a:hover,
.cma-account-navigation .menu-item.current-menu-item a:hover {
    background-color: #135e96;
}

/* Main Content */
.cma-my-account-main {
    flex: 1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 30px;
}

.cma-account-tab h3 {
    margin: 0 0 25px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

/* Dashboard */
.cma-dashboard-content p {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.cma-dashboard-info {
    margin: 30px 0;
}

.cma-dashboard-info h4 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.cma-info-table {
    width: 100%;
    border-collapse: collapse;
}

.cma-info-table th,
.cma-info-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cma-info-table th {
    font-weight: 600;
    color: #333;
    width: 150px;
}

.cma-info-table td {
    color: #666;
}

.cma-dashboard-actions {
    margin-top: 25px;
}

/* Edit Profile */
.cma-change-password-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.cma-change-password-section h4 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Favorite */
.cma-favorite-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.cma-tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    margin-bottom: -2px;
    position: relative;
}

.cma-tab-button:hover {
    color: #2271b1;
    background: #f5f5f5;
}

.cma-tab-button.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

.cma-tab-count {
    color: #999;
    font-weight: normal;
    margin-left: 5px;
}

.cma-tab-button.active .cma-tab-count {
    color: #2271b1;
}

.cma-favorite-content {
    margin-top: 20px;
}

.cma-tab-content {
    display: none;
}

.cma-tab-content.active {
    display: block;
}

.cma-favorite-content p {
    color: #666;
    margin-bottom: 20px;
}

.cma-no-items {
    padding: 40px 20px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
    text-align: center;
    font-size: 14px;
}

.cma-favorites-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cma-favorites-list li {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.cma-favorites-list li:last-child {
    border-bottom: none;
}

/* Category List */
.cma-category-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cma-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s;
}

.cma-category-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cma-category-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    flex: 1;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}

.cma-category-name:hover {
    color: #2271b1;
    text-decoration: underline;
}

.cma-category-favorite-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.cma-category-favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cma-category-favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cma-category-favorite-btn .heart-icon {
    width: 16px;
    height: 16px;
    stroke: #949CA1;
    fill: none;
    transition: all 0.3s ease;
}

.cma-category-favorite-btn:hover .heart-icon {
    stroke: #f44336;
}

.cma-category-favorite-btn.favorited .heart-icon {
    fill: #f44336;
    stroke: #f44336;
}

.cma-category-favorite-btn.favorited:hover .heart-icon {
    fill: #d32f2f;
    stroke: #d32f2f;
}

/* Favorite Heart Button - matches theme styles exactly */
.favorite-heart-btn {
    position: absolute;
    top: 15px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-heart-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.favorite-heart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.favorite-heart-btn .heart-icon {
    width: 16px;
    height: 16px;
    stroke: #949CA1;
    fill: none;
    transition: all 0.3s ease;
}

.favorite-heart-btn:hover .heart-icon {
    stroke: #f44336;
}

.favorite-heart-btn.favorited .heart-icon {
    fill: #f44336;
    stroke: #f44336;
}

.favorite-heart-btn.favorited:hover .heart-icon {
    fill: #d32f2f;
    stroke: #d32f2f;
}

/* Event Card - ensure relative positioning for absolute heart button */
.eventCard {
    position: relative;
}

.eventCardContent {
    position: relative;
}

/* Event Card Wrapper - matches theme styles */
.eventCardWrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .cma-favorite-tabs {
        flex-wrap: wrap;
    }
    
    .cma-tab-button {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .eventCardWrapper {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cma-my-account-content {
        flex-direction: column;
    }
    
    .cma-my-account-sidebar {
        flex: 1;
    }
    
    .cma-form-row {
        flex-direction: column;
    }
}

/* Loading State */
.cma-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
