/* 
 * Modern Affiliate Dashboard Plugin Frontend Styles
 * 
 * This file contains all the CSS styles for the public-facing portion of the plugin
 */

/* Container and dashboard base styles */
.wp-affiliate-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
}

.wp-affiliate-dashboard {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
}

/* Tab navigation styling */
.wp-affiliate-tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}
.wp-affiliate-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    background-color: #f1f1f1;
    transition: background-color 0.3s;
}
.wp-affiliate-tab.active {
    background-color: #fff;
    border-bottom: 2px solid #fff;
    font-weight: bold;
}

/* Content area styling */
.wp-affiliate-content {
    display: none;
    padding: 20px 0;
}
.wp-affiliate-content.active {
    display: block;
}

/* Form input styling */
.wp-affiliate-input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}
.wp-affiliate-button {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.wp-affiliate-button:hover {
    background-color: #005a87;
}

/* Dashboard styling */
.wp-affiliate-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
}
.wp-affiliate-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.wp-affiliate-stats .stat {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}
.wp-affiliate-stats .stat:hover {
    transform: translateY(-5px);
}
.wp-affiliate-stats .stat.highlight {
    background: #f8f9fa;
    border: 2px solid #0073aa;
}
.wp-affiliate-stats .stat.available {
    background: #e8f5e9;
}
.wp-affiliate-stats .stat-icon {
    font-size: 24px;
    margin-bottom: 15px;
    color: #0073aa;
    background: rgba(0,115,170,0.1);
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    display: inline-block;
}
.wp-affiliate-stats .stat h4 {
    margin: 0 0 10px;
    color: #666;
    font-size: 16px;
}
.wp-affiliate-stats .stat p {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
    color: #0073aa;
}
.wp-affiliate-orders {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}
.wp-affiliate-orders h4 {
    margin-bottom: 10px;
}
.wp-affiliate-orders ul {
    list-style: none;
    padding-left: 0;
}
.wp-affiliate-orders li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* Form container spacing */
.wp-affiliate-form p {
    margin-bottom: 15px;
}
.wp-affiliate-forgot-password {
    display: inline-block;
    margin-top: 10px;
    color: #0073aa;
    text-decoration: none;
}
.wp-affiliate-forgot-password:hover {
    color: #005a87;
    text-decoration: underline;
}
.wp-affiliate-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}
.wp-affiliate-tab {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.wp-affiliate-tab.active {
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}
.wp-affiliate-dashboard .wp-affiliate-content {
    display: none;
}
.wp-affiliate-dashboard .wp-affiliate-content.active {
    display: block !important;
}
.wp-affiliate-dashboard .wp-affiliate-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.wp-affiliate-dashboard .wp-affiliate-tab {
    padding: 10px 20px;
    cursor: pointer;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.wp-affiliate-dashboard .wp-affiliate-tab.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Logout tab styling */
.logout-tab {
    background-color: #dc3545 !important;
    color: white !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-weight: bold;
    border-color: #dc3545 !important;
    margin-left: auto;
}

.logout-tab:hover {
    background-color: #c82333 !important;
    text-decoration: none;
    color: white !important;
}

.logout-icon {
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    stroke-width: 2;
}

/* Commission list styling */
.commission-list {
    display: grid;
    gap: 20px;
}
.commission-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}
.commission-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}
.commission-header .order-id {
    font-weight: bold;
    color: #333;
}
.commission-header .commission-amount {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}
.commission-details {
    padding: 20px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.detail-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.detail-row .label {
    color: #666;
    font-weight: 500;
}
.payout-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
.payout-status.ready {
    background: #e8f5e9;
    color: #2e7d32;
}
.payout-status.waiting {
    background: #fff3e0;
    color: #ef6c00;
}
.request-payout {
    margin-top: 10px;
    background: #4caf50 !important;
}
.request-payout:hover {
    background: #388e3c !important;
}
.wp-affiliate-stats .stat.success {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}
.wp-affiliate-stats .stat.pending {
    background: #fff3e0;
}

.wp-affiliate-message {
    display: none;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.wp-affiliate-message.success {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.wp-affiliate-message.error {
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

.password-hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Disable form during submission */
.wp-affiliate-form input[disabled] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Remove old logout button styles */
.logout-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545;
    transition: background-color 0.3s ease;
    margin: 15px 0;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logout-button:hover {
    background-color: #c82333;
}

.logout-icon {
    margin-right: 10px;
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
} 
form#login-form input[type=text], form#login-form input[type=password],form#register-form input[type=text],form#register-form input[type=password],form#register-form input[type=email]{
    display: block;
    margin-bottom: 1em;
    width: 100%;
    line-height: 33px;
    border: 1px solid #ccc;
    border-radius: 4px;
}