/* Tabs */
.nav-tab-wrapper {
   border-bottom: 1px solid #c3c4c7;
   margin: 0 0 30px;
   padding-top: 9px;
   padding-bottom: 0;
   line-height: inherit;
   clear: both;
}

.nav-tab {
   float: left;
   border: 1px solid #c3c4c7;
   border-bottom: none;
   margin-left: .5em;
   padding: 5px 10px;
   font-size: 14px;
   line-height: 1.71428571;
   font-weight: 600;
   background: #dcdcde;
   color: #50575e;
   text-decoration: none;
   white-space: nowrap;
}

.nav-tab:first-child {
   margin-left: 0;
}

.nav-tab-active,
.nav-tab:hover {
   background: #fff;
   color: #1d2327;
}

.nav-tab-active {
   margin-bottom: -1px;
   border-bottom: 1px solid #fff;
}

/* Loading State */
.fxblue-track-records-wrapper.loading {
   position: relative;
   min-height: 200px;
}

.fxblue-track-records-wrapper.loading:after {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(255, 255, 255, 0.7);
   z-index: 1;
}

.fxblue-track-records-wrapper.loading:before {
   content: '';
   position: absolute;
   top: 50%;
   left: 50%;
   width: 20px;
   height: 20px;
   margin: -10px 0 0 -10px;
   border: 2px solid #2271b1;
   border-top-color: transparent;
   border-radius: 50%;
   animation: spin 1s linear infinite;
   z-index: 2;
}

@keyframes spin {
   to {
      transform: rotate(360deg);
   }
}

/* Track Records Grid */
.track-records-content {
   margin-top: 50px;
}

.track-records-grid {
   display: grid;
   grid-template-columns: 1fr;
   gap: 30px;
}

.track-record-item {
   background: #fff;
   padding: 20px;
   border: 1px solid #ddd;
   border-radius: 4px;
   min-height: 600px;
}

.track-record-item h3 {
   margin: 0 0 15px;
   font-size: 16px;
   font-weight: 600;
}

.fxblue-track-record-responsive {
   position: relative;
   height: 0;
   overflow: hidden;
   padding-bottom: 70%;
}

.fxblue-track-record {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   border: none;
   min-height: 500px;
}

/* Configuration Form */
.track-record-form-container {
   position: relative;
   background: #fff;
   padding: 24px;
   border: 1px solid #ddd;
   border-radius: 4px;
   margin-top: 50px;
}

.form-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 24px;
   margin-bottom: 20px;
}

.form-field label {
   display: block;
   margin-bottom: 8px;
   font-size: 13px;
   font-weight: 600;
   color: #374151;
}

.form-field input,
.form-field select {
   width: 100%;
   height: 36px;
   padding: 0 0 0 12px;
   border: 1px solid #ddd;
   border-radius: 4px;
   font-size: 13px;
}

.form-field input:focus,
.form-field select:focus {
   border-color: #2271b1;
   box-shadow: 0 0 0 1px #2271b1;
   outline: none;
}

.help-link {
   display: block;
   font-weight: normal;
   color: #2271b1;
   text-decoration: none;
   margin-bottom: 15px;
}

.help-link:hover {
   text-decoration: underline;
}

.asterisk {
   margin-left: 4px;
   color: #d63638;
}

.form-submit {
   grid-column: 1 / -1;
   margin-top: 16px;
}

.tr-btn.tr-btn-primary {
   width: 100%;
   height: 36px;
   padding: 0;
   background: #3B82F6;
   border: none;
   color: #fff;
   font-size: 13px;
   transition: all 0.2s ease;
}

.tr-btn.tr-btn-primary:hover {
   background: #2563EB;
   border: none;
}

/* Form overlay */
.form-overlay {
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: rgba(255, 255, 255, 0.9);
   z-index: 2;
   display: flex;
   align-items: center;
   justify-content: center;
}

.form-disabled {
   opacity: 0.5;
   pointer-events: none;
}

.vip-message {
   background: #fff8e5;
   padding: 15px 20px;
   border-radius: 4px;
   border: 1px solid #f0b849;
   font-size: 14px;
   line-height: 1.4;
   max-width: 400px;
   text-align: center;
}

.vip-message a {
   color: #2271b1;
   font-weight: 500;
   text-decoration: none;
}

.vip-message a:hover {
   text-decoration: underline;
}

/* Table */
.widefat {
   width: 100%;
   border: 1px solid #ddd;
   border-radius: 4px;
   background: #fff;
   margin-top: 20px;
}

.widefat th {
   padding: 10px 12px;
   background: #f5f5f5;
   border-bottom: 1px solid #ddd;
   font-size: 13px;
   font-weight: 600;
   color: #374151;
}

.widefat td {
   padding: 10px 12px;
   border-bottom: 1px solid #ddd;
   font-size: 13px;
   vertical-align: middle;
}

.visibility-badge {
   display: inline-flex;
   padding: 4px 8px;
   border-radius: 3px;
   font-size: 12px;
   font-weight: 500;
}

.visibility-badge.public {
   background: #e6f3fa;
   color: #2271b1;
}

.visibility-badge.private {
   background: #fef7e7;
   color: #996800;
}

.actions {
   display: flex;
   gap: 8px;
}

.tr-btn.tr-btn-small {
   height: 28px;
   padding: 0 10px;
   font-size: 12px;
   display: inline-flex;
   align-items: center;
   gap: 4px;
}

.tr-btn.edit-record {
   background: #3B82F6;
   border: none;
   color: #fff;
}

.tr-btn.edit-record:hover {
   background: #2563EB;
   border: none;
   color: #fff;
}

.tr-btn.delete-record {
   background: #EF4444;
   border: none;
   color: #fff;
}

.tr-btn.delete-record:hover {
   background: #DC2626;
   border: none;
   color: #fff;
}

/* Messages */
.toast-message {
   margin: 16px 0;
   padding: 12px 24px;
   border-radius: 4px;
   opacity: 0;
   transition: opacity 0.3s ease;
   font-size: 13px;
}

.toast-message.show {
   opacity: 1;
}

.toast-message.success {
   background: #d1fae5;
   color: #065f46;
}

.toast-message.error {
   background: #fee2e2;
   color: #991b1b;
}

.vip-message {
   background: #fff8e5;
   color: #92400e;
   padding: 12px 24px;
   border-radius: 4px;
   font-size: 13px;
   margin: 16px 0;
}

.vip-message a {
   color: #2271b1;
   text-decoration: none;
}

.vip-message a:hover {
   text-decoration: underline;
}

.visibility-info {
   font-size: 12px;
   color: #757575;
   margin: 8px 0 0;
   font-style: italic;
}

@media (max-width: 782px) {
   .form-grid {
      grid-template-columns: 1fr;
      gap: 12px;
   }

   .actions {
      flex-direction: column;
   }

   .tr-btn.tr-btn-small {
      width: 100%;
      justify-content: center;
   }
}