/* CPD Log Manager Styles */

/* Container */
.cpd-log-container {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cpd-log-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Table Styles */
.cpd-log-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cpd-log-table thead {
    background: #0073aa;
    color: #ffffff;
}

.cpd-log-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpd-log-table thead th:nth-child(1) { width: 10%; } /* Date */
.cpd-log-table thead th:nth-child(2) { width: 15%; } /* Activity */
.cpd-log-table thead th:nth-child(3) { width: 28%; } /* What Learnt */
.cpd-log-table thead th:nth-child(4) { width: 28%; } /* Impact */
.cpd-log-table thead th:nth-child(5) { width: 10%; } /* Hours */
.cpd-log-table thead th:nth-child(6) { width: 9%; }  /* Actions */

.cpd-log-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.cpd-log-table tbody tr:hover {
    background-color: #f5f5f5;
}

.cpd-log-table tbody td {
    padding: 12px 15px;
    color: #333;
    font-size: 14px;
    vertical-align: top;
}

.cpd-log-table tbody td:nth-child(1) {
    font-weight: 500;
    white-space: nowrap;
}

.cpd-log-table tbody td:nth-child(5) {
    text-align: center;
    font-weight: 600;
}

.cpd-log-table tbody td:nth-child(6) {
    text-align: center;
}

.cpd-log-table tfoot {
    background: #f9f9f9;
    border-top: 2px solid #0073aa;
}

.cpd-log-table tfoot td {
    padding: 15px;
    font-size: 16px;
}

.cpd-total-row td {
    color: #0073aa;
}

/* Action Links */
.cpd-delete-link {
    color: #dc3232;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 10px;
    border: 1px solid #dc3232;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.cpd-delete-link:hover {
    background: #dc3232;
    color: #ffffff;
}

.cpd-auto-entry {
    color: #46b450;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    background: #f0f8f0;
    border-radius: 4px;
    display: inline-block;
}

/* Form Styles */
.cpd-entry-form-container {
    margin: 20px 0;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cpd-entry-form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.cpd-entry-form {
    max-width: 600px;
}

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

.cpd-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

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

.cpd-form-field input[type="text"],
.cpd-form-field input[type="date"],
.cpd-form-field input[type="number"],
.cpd-form-field textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cpd-form-field input[type="text"]:focus,
.cpd-form-field input[type="date"]:focus,
.cpd-form-field input[type="number"]:focus,
.cpd-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.cpd-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.cpd-submit-button {
    background: #0073aa;
    color: #ffffff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cpd-submit-button:hover {
    background: #005a87;
}

.cpd-submit-button:active {
    background: #004a70;
}

/* Messages */
.cpd-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.cpd-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cpd-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .cpd-log-table {
        border: 0;
    }
    
    .cpd-log-table thead {
        display: none;
    }
    
    .cpd-log-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px;
    }
    
    .cpd-log-table tbody td {
        display: block;
        text-align: right;
        padding: 10px;
        border-bottom: 1px solid #eee;
    }
    
    .cpd-log-table tbody td:last-child {
        border-bottom: 0;
    }
    
    .cpd-log-table tbody td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #0073aa;
    }
    
    .cpd-log-table tfoot tr {
        display: block;
    }
    
    .cpd-log-table tfoot td {
        display: block;
        text-align: center;
    }
    
    .cpd-log-table tfoot td[colspan] {
        display: none;
    }
    
    .cpd-entry-form-container {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .cpd-delete-link,
    .cpd-auto-entry,
    .cpd-entry-form-container {
        display: none;
    }
    
    .cpd-log-table {
        box-shadow: none;
    }
    
    .cpd-log-table tbody tr:hover {
        background-color: transparent;
    }
}

/* Custom Color Scheme Variables (Easy to customize) */
:root {
    --cpd-primary-color: #0073aa;
    --cpd-primary-hover: #005a87;
    --cpd-success-color: #46b450;
    --cpd-danger-color: #dc3232;
    --cpd-text-color: #333;
    --cpd-border-color: #ddd;
    --cpd-background: #ffffff;
}

/* Alternative color scheme - Uncomment to use */
/*
:root {
    --cpd-primary-color: #2c5aa0;
    --cpd-primary-hover: #1e3f75;
    --cpd-success-color: #28a745;
    --cpd-danger-color: #e74c3c;
    --cpd-text-color: #2c3e50;
    --cpd-border-color: #d0d3d4;
    --cpd-background: #f8f9fa;
}
*/
