/**
 * Rock Member Portal Styles
 * Clean, professional styling for the member portal
 */

/* Reset and Base Styles */
.rock-member-portal * {
    box-sizing: border-box;
}

.rock-member-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.rock-portal-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.rock-portal-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 300;
}

.rock-portal-subtitle {
    margin: 0;
    font-size: 1.2em;
    opacity: 0.9;
}

/* Tabs */
.rock-portal-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.rock-tab-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin: 0;
    padding: 0;
}

.rock-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 20px;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rock-tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.rock-tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.rock-tab-btn .dashicons {
    font-size: 20px;
}

/* Tab Content */
.rock-tab-content {
    position: relative;
}

.rock-tab-panel {
    display: none;
    padding: 40px;
    min-height: 500px;
}

.rock-tab-panel.active {
    display: block;
}

/* Sections */
.rock-profile-section,
.rock-articles-section {
    max-width: 800px;
    margin: 0 auto;
}

.rock-section-description {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Forms */
.rock-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.rock-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.rock-form-group {
    flex: 1;
    margin-bottom: 20px;
}

.rock-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.rock-form-group .required {
    color: #dc3545;
}

.rock-form-input,
.rock-form-input[type="text"],
.rock-form-input[type="url"],
.rock-form-input[type="file"],
.rock-form-input[type="email"],
.rock-form-input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.rock-form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rock-form-input[type="file"] {
    padding: 8px 12px;
    background: white;
    border: 2px dashed #dee2e6;
    cursor: pointer;
}

.rock-form-input[type="file"]:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.rock-form-help {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #6c757d;
}

.rock-current-file {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 4px solid #28a745;
}

.rock-current-file a {
    color: #155724;
    text-decoration: none;
    font-weight: 500;
}

.rock-current-file a:hover {
    text-decoration: underline;
}

.rock-delete-cv-link {
    color: #dc3545 !important;
    font-weight: 500;
}

.rock-delete-cv-link:hover {
    color: #c82333 !important;
    text-decoration: underline;
}

/* Buttons */
.rock-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #6c757d;
    color: white;
}

.rock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rock-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rock-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.rock-btn-secondary {
    background: #6c757d;
}

.rock-btn-secondary:hover {
    background: #5a6268;
}

.rock-btn-danger {
    background: #dc3545;
}

.rock-btn-danger:hover {
    background: #c82333;
}

.rock-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.rock-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

/* Articles Section */
.rock-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.rock-articles-header h2 {
    margin: 0;
    color: #495057;
}

.rock-articles-list {
    display: grid;
    gap: 20px;
}

.rock-article-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    transition: box-shadow 0.3s ease;
}

.rock-article-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.rock-article-content {
    flex: 1;
}

.rock-article-content h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.3em;
}

.rock-article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
}

.rock-article-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
}

.rock-article-status.status-draft {
    background: #fff3cd;
    color: #856404;
}

.rock-article-status.status-publish {
    background: #d4edda;
    color: #155724;
}

.rock-article-date {
    color: #6c757d;
}

.rock-article-excerpt {
    color: #6c757d;
    margin: 0;
    font-style: italic;
}

.rock-article-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.rock-no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Modal */
.rock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.rock-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.rock-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.rock-modal-header h2 {
    margin: 0;
    color: #495057;
}

.rock-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.rock-modal-close:hover {
    background: #e9ecef;
}

.rock-modal-body {
    padding: 30px;
}

/* Messages */
.rock-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-weight: 500;
}

.rock-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rock-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rock-portal-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
    margin: 20px 0;
}

/* Loading States */
.rock-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.rock-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: rock-spin 1s linear infinite;
}

@keyframes rock-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Profile Display Shortcode Styles */
.rock-profile-display {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.rock-profile-title {
    margin: 0 0 25px 0;
    color: #495057;
    font-size: 1.8em;
    font-weight: 400;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    display: flex; flex-direction: row; justify-content: space-between; align-items: center;
}
.rock-profile-title svg{width: 20px !important; height: 20px !important;}
.rock-edit-profile-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px;
    border-radius: 4px;
}

.rock-edit-profile-link:hover {
    color: #667eea;
    background-color: #f8f9fa;
}

.rock-edit-profile-link svg {
    fill: currentColor;
}

.rock-edit-articles-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px;
    border-radius: 4px;
    margin-left: 10px;
}

.rock-edit-articles-link:hover {
    color: #28a745;
    background-color: #f8f9fa;
}

.rock-edit-articles-link svg {
    fill: currentColor;
}

.rock-profile-fields {
    display: grid;
    gap: 15px;
}

.rock-profile-vertical .rock-profile-fields {
    grid-template-columns: 1fr;
}

.rock-profile-horizontal .rock-profile-fields {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.rock-profile-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rock-profile-horizontal .rock-profile-field {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.rock-profile-field label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.rock-profile-horizontal .rock-profile-field label {
    min-width: 150px;
    flex-shrink: 0;
}

.rock-profile-field span {
    color: #6c757d;
    font-size: 16px;
}

.rock-profile-field a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.rock-profile-field a:hover {
    text-decoration: underline;
}

.rock-cv-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #667eea;
    color: white !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px !important;
    transition: background 0.3s ease;
}

.rock-cv-link:hover {
    background: #5a6fd8;
    text-decoration: none !important;
}

/* Biography Field Styles */
.rock-profile-biography {
    grid-column: 1 / -1; /* Span full width in grid layout */
}

.rock-profile-biography-content {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 5px;
}

.rock-profile-biography-content p {
    margin: 0 0 15px 0;
}

.rock-profile-biography-content p:last-child {
    margin-bottom: 0;
}

/* Edit Profile Form Styles */
.rock-edit-profile-form {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.rock-form-title {
    margin: 0 0 30px 0;
    color: #495057;
    font-size: 1.8em;
    font-weight: 400;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
}

.rock-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rock-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rock-form-field-full {
    grid-column: 1 / -1;
}

.rock-form-field label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.rock-form-input,
.rock-form-textarea {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.rock-form-input:focus,
.rock-form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rock-form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.rock-current-file {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #6c757d;
}

.rock-current-file a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.rock-current-file a:hover {
    text-decoration: underline;
}

.rock-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.rock-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rock-btn-primary {
    background: #667eea;
    color: white;
}

.rock-btn-primary:hover {
    background: #5a6fd8;
    color: white;
}

.rock-btn-secondary {
    background: #6c757d;
    color: white;
}

.rock-btn-secondary:hover {
    background: #5a6268;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rock-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rock-form-actions {
        flex-direction: column;
    }
    
    .rock-btn {
        justify-content: center;
    }
}

.rock-cv-link::before {
    content: "\f1c1";
    font-family: "dashicons";
    font-size: 16px;
}

/* Articles Display Shortcode Styles */
.rock-articles-display {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.rock-articles-title {
    margin: 0 0 25px 0;
    color: #495057;
    font-size: 1.8em;
    font-weight: 400;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    display: flex; flex-direction: row; justify-content: space-between; align-items: center;
}
.rock-articles-title svg{width: 20px !important; height: 20px !important;}

.rock-articles-display .rock-articles-list {
    display: grid;
    gap: 20px;
}

.rock-articles-display .rock-article-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    transition: box-shadow 0.3s ease;
}

.rock-articles-display .rock-article-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.rock-articles-display .rock-article-content {
    flex: 1;
}

.rock-articles-display .rock-article-title {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1em;
}

.rock-articles-display .rock-article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
}

.rock-articles-display .rock-article-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
}

.rock-articles-display .rock-article-status.status-draft {
    background: #fff3cd;
    color: #856404;
}

.rock-articles-display .rock-article-status.status-publish {
    background: #d4edda;
    color: #155724;
}

.rock-articles-display .rock-article-date {
    color: #6c757d;
}

.rock-articles-display .rock-article-excerpt {
    color: #6c757d;
    margin: 0;
    font-style: italic;
}

.rock-articles-display .rock-article-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.rock-articles-display .rock-no-articles {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rock-member-portal {
        padding: 10px;
    }
    
    .rock-portal-header h1 {
        font-size: 2em;
    }
    
    .rock-tab-nav {
        flex-direction: column;
    }
    
    .rock-tab-btn {
        justify-content: flex-start;
        text-align: left;
    }
    
    .rock-tab-panel {
        padding: 20px;
    }
    
    .rock-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .rock-articles-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rock-article-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .rock-article-actions {
        align-self: flex-end;
    }
    
    .rock-form-actions {
        flex-direction: column;
    }
    
    .rock-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .rock-modal-header,
    .rock-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .rock-portal-header {
        padding: 20px 0;
    }
    
    .rock-portal-header h1 {
        font-size: 1.8em;
    }
    
    .rock-form {
        padding: 20px;
    }
    
    .rock-tab-panel {
        padding: 15px;
    }
}
